Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.

View Entry Info: Webif not showing TV picture in screen capture

Category:
Possible Bug
What ViX Image build number are you using?
Please provide your ViX Team image build number. Menu > Information > About > Build number > ENTER THIS NUMBER e.g. 4.2.028
6.5.002
Have you tried a flash WITHOUT settings restore?
Have you tried this? PLEASE SELECT YES OR NO.
No
Have you tried a flash WITH settings restore?
Have you tried this? PLEASE SELECT YES OR NO.
Yes
Attachments
Page 4 of 4 FirstFirst ... 234
Results 46 to 58 of 58

Thread: Webif not showing TV picture in screen capture

  1. #46
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by LraiZer View Post
    I was only trying to remove the -D_FILE_OFFSET_BITS=64 flag here so that the call to mmap64 is automatically redirected back to mmap() which works.
    Ah. You're saying it is the use of mmap64() that is the issue., not 64-bit time?

    Still weird. mmap64 should work an a 32-bit system (otherwise you could never mmap sections of large files - and you can...)
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  2. #47
    twol's Avatar
    Title
    Moderator
    Join Date
    Apr 2012
    Posts
    8,424
    Thanks
    997
    Thanked 2,896 Times in 2,249 Posts
    Quote Originally Posted by LraiZer View Post
    I was only trying to remove the -D_FILE_OFFSET_BITS=64 flag here so that the call to mmap64 is automatically redirected back to mmap() which works.

    If all the other boxes are working and you want to try fixing it for just mips32 to extend their life by 14 years?

    Code:
    DESCRIPTION="AiO screenshot grabber"
    MAINTAINER = "PLi team"
    LICENSE = "GPL-2.0-only"
    LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
    
    DEPENDS = "jpeg libpng zlib"
    
    inherit gitpkgv
    
    TARGET_CC_ARCH:remove = "${@bb.utils.contains('TUNE_FEATURES', 'mips32', '-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64' , '', d)}"
    
    INSANE_SKIP = "${@bb.utils.contains('TUNE_FEATURES', 'mips32', '32bit-time' , '', d)}"
    
    PV = "1.0+git"
    PKGV = "1.0+git${GITPKGV}"
    
    SRC_URI="git://github.com/oe-alliance/aio-grab.git;protocol=https;branch=master"
    
    S = "${WORKDIR}/git"
    
    inherit autotools pkgconfig
    Well your original change works for both the old boxes and new (I tested on vu+ uno4kse and GBUE4k), so thats the commit on OE-A… and don,t forget someone posted solo4k not working and thats not mips.
    my Xtrend ET7500 (mips) works on the old code no issue, so again not all mips boxes have an issue.
    Last edited by twol; 20-04-24 at 18:37.
    Gigablue Quad 4K & UE 4K
    .........FBC Tuners:
    ------------------> GT-Sat unicable LNB to 1.5M dish(28.2E)
    ------------------> Gigablue unicable LNB to 80 cm dish(19.2E)
    .......................> FBC & DVB-S2X into 90cm dish (27.5W) Opticum robust Unicable LNB
    AX HD61, Edision Osmio 4K+, Zgemma H9Combo, Octagon SF8008 , gbtrio4k, h9se using unicable ports
    Zgemma H9 C/S into Giga4K

  3. #48
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by twol View Post
    Well your original change works for both the old boxes and new (I tested on vu+ uno4kse and GBUE4k), so thats the commit on OE-A… and don,t forget someone posted solo4k not working and thats not mips.
    my Xtrend ET7500 (mips) works on the old code no issue, so again not all mips boxes have an issue.
    All of which makes me wonder whether the problem is something else, and this change lets things work by accident.

    EDIT: such as registeroffset and mem2memdma_register being declared as unsigned int instead of off_t?
    Last edited by birdman; 20-04-24 at 21:09.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  4. #49

    Title
    V.I.P
    Join Date
    Jan 2011
    Posts
    265
    Thanks
    60
    Thanked 572 Times in 188 Posts
    The mmap(2) - Linux man page declares offset as off_t not unsigned int in its in example, so that code does looks wrong there.


    sizeof(off_t) changes using -D_FILE_OFFSET_BITS=64 the same way as sizeof(time_t) changes when using -D_TIME_BITS=64

  5. #50

    Title
    V.I.P
    Join Date
    Jan 2011
    Posts
    265
    Thanks
    60
    Thanked 572 Times in 188 Posts
    Try just declaring int as size_t to fix it?

    This single change alone fixed it for me.

    Code:
    diff --git a/main.c b/main.c
    index 1c1fee7..a01297d 100644
    --- a/main.c
    +++ b/main.c
    @@ -1148,7 +1148,7 @@ void getvideo(unsigned char *video, int *xres, int *yres)
     			return;
     		}
     
    -		int adr, adr2, ofs, ofs2, offset, pageoffset;
    +		size_t adr, adr2, ofs, ofs2, offset, pageoffset;
     		int xtmp,xsub,ytmp,t2,dat1;
     
     		if (stb_type == BRCM73565 || stb_type == BRCM73625 || stb_type == BRCM7439DAGS || stb_type == BRCM7439 || stb_type == BRCM75845 || stb_type == BRCM72604) {

  6. #51
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by LraiZer View Post
    Try just declaring int as size_t to fix it?
    Offsets are off_t. not size_t.
    The fact that these are the same size doesn't alter the fact that they should be declared the same way as they are defined.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  7. #52

    Title
    V.I.P
    Join Date
    Jan 2011
    Posts
    265
    Thanks
    60
    Thanked 572 Times in 188 Posts
    If you can make 'adr' work using off_t?
    'adr' only works defined with size_t for me.

    Origianl declaration:

    int adr, adr2, ofs, ofs2, offset, pageoffset;
    Code:
    Grabbing 32bit Framebuffer ...
    ... Framebuffer-Size: 1920 x 1080
    Grabbing Video ...
    Adr: BC000000 Adr2: BC1FE000 OFS: 440 240 stride:780
    Adr: BC000000 Adr2: BC1FE000 offset: 1FE000 pageoffset:0
    Stride: 1920 Res: 1080
    sizeof(off_t) 8 sizeof(Adr:) 4 sizeof(Adr2): 4 sizeof(OFS): 4 sizeof(OFS2): 4
    Adr: BC000000 Adr2: BC1FE000 OFS: 440 240 memory_tmp_size:31E000
    Mainmemory: <Memmapping failed>
    Resizing Video to 1920 x 1080 ...
    Merge Video with Framebuffer ...
    Saving 24 bit /tmp/screenshot.bmp ...
    ... Done !
    with off_t:

    off_t adr;
    int adr2, ofs, ofs2, offset, pageoffset;
    Code:
    Grabbing 32bit Framebuffer ...
    ... Framebuffer-Size: 1920 x 1080
    Grabbing Video ...
    Adr: BC000000 Adr2: FFFFFFFF OFS: BC1FE000 440 stride:240
    Adr: BC000000 Adr2: FFFFFFFF offset: BC1FE000 pageoffset:1FE000
    Stride: 1920 Res: 1080
    sizeof(off_t) 8 sizeof(Adr:) 8 sizeof(Adr2): 4 sizeof(OFS): 4 sizeof(OFS2): 4
    Adr: BC000000 Adr2: FFFFFFFF OFS: BC1FE000 440 memory_tmp_size:240
    Mainmemory: <Memmapping failed>
    Resizing Video to 1920 x 1080 ...
    Merge Video with Framebuffer ...
    Saving 24 bit /tmp/screenshot.bmp ...
    ... Done !
    working with size_t:

    size_t adr;
    int adr2, ofs, ofs2, offset, pageoffset;
    Code:
    Grabbing 32bit Framebuffer ...
    ... Framebuffer-Size: 1920 x 1080
    Grabbing Video ...
    Adr: BC000000 Adr2: BC1FE000 OFS: 440 240 stride:780
    Adr: BC000000 Adr2: BC1FE000 offset: 1FE000 pageoffset:0
    Stride: 1920 Res: 1080
    sizeof(off_t) 8 sizeof(Adr:) 4 sizeof(Adr2): 4 sizeof(OFS): 4 sizeof(OFS2): 4
    Adr: BC000000 Adr2: BC1FE000 OFS: 440 240 memory_tmp_size:31E000
    Merge Video with Framebuffer ...
    Saving 24 bit /tmp/screenshot.bmp ...
    ... Done !

  8. #53

    Title
    V.I.P
    Join Date
    Jan 2011
    Posts
    265
    Thanks
    60
    Thanked 572 Times in 188 Posts
    If you must declare off_t for the mmap offset, you could try this patch to remove the padding from adr of /* start of videomem */
    This seems to also work.

    Code:
    diff --git a/main.c b/main.c
    index 1c1fee7..9a6e455 100644
    --- a/main.c
    +++ b/main.c
    @@ -161,8 +161,8 @@ static enum {UNKNOWN, DMNEW, WETEK, AZBOX863x, AZBOX865x, ST, PALLAS, VULCAN, XI
     
     static int chr_luma_stride = 0x40;
     static int chr_luma_register_offset = 0;
    -static unsigned int registeroffset = 0;
    -static unsigned int mem2memdma_register = 0;
    +static off_t registeroffset = 0;
    +static off_t mem2memdma_register = 0;
     static int quiet = 0;
     static int video_dev = 0;
     
    @@ -1148,7 +1148,8 @@ void getvideo(unsigned char *video, int *xres, int *yres)
     			return;
     		}
     
    -		int adr, adr2, ofs, ofs2, offset, pageoffset;
    +		off_t adr;
    +		int adr2, ofs, ofs2, offset, pageoffset;
     		int xtmp,xsub,ytmp,t2,dat1;
     
     		if (stb_type == BRCM73565 || stb_type == BRCM73625 || stb_type == BRCM7439DAGS || stb_type == BRCM7439 || stb_type == BRCM75845 || stb_type == BRCM72604) {
    @@ -1158,13 +1159,13 @@ void getvideo(unsigned char *video, int *xres, int *yres)
     			ofs2 = data[chr_luma_register_offset + 28] << 4; /* chroma lines */
     			adr2 = data[chr_luma_register_offset + 3] << 24 | data[chr_luma_register_offset + 2] << 16 | data[chr_luma_register_offset + 1] << 8;
     			stride = data[0x19] << 8 | data[0x18];
    -			adr = data[0x37] << 24 | data[0x36] << 16 | data[0x35] << 8; /* start of videomem */
    +			adr = (data[0x37] << 24 | data[0x36] << 16 | data[0x35] << 8) & 0xffff0000; /* start of videomem */
     		} else {
     			ofs = data[chr_luma_register_offset + 8] << 4; /* luma lines */
     			ofs2 = data[chr_luma_register_offset + 12] << 4; /* chroma lines */
     			adr2 = data[chr_luma_register_offset + 3] << 24 | data[chr_luma_register_offset + 2] << 16 | data[chr_luma_register_offset + 1] << 8;
     			stride = data[0x15] << 8 | data[0x14];
    -			adr = data[0x1f] << 24 | data[0x1e] << 16 | data[0x1d] << 8; /* start of videomem */
    +			adr = (data[0x1f] << 24 | data[0x1e] << 16 | data[0x1d] << 8) & 0xffff0000; /* start of videomem */
     		}
     		offset = adr2 - adr;
     		pageoffset = adr & 0xfff;

  9. #54
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by LraiZer View Post
    If you must declare off_t for the mmap offset,
    From the man page for mmap():

    Code:
             void *mmap(void addr[.length], size_t length, int prot, int flags,
                        int fd, off_t offset);
    
    So the offset must be an off_t.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  10. #55
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by twol View Post
    Well your original change works for both the old boxes and new (I tested on vu+ uno4kse and GBUE4k), so thats the commit on OE-A… and don,t forget someone posted solo4k not working and thats not mips.
    But it appears that the bug is nothing to do with the build options, but rather in the code itself, which is where the fix needs to go.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  11. #56
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Of course, it would help in knowing which mmap() produces the error if there weren't 7 instances of exactly the same error message
    Code:
    "Mainmemory: <Memmapping failed>\n"
    but a different one on each occasion.

    There are also 4 printf() calls where the parameters to fulfill the template are missing.
    How does this ever get built!
    Last edited by birdman; 21-04-24 at 22:42.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  12. #57
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by LraiZer View Post
    with off_t:

    off_t adr;
    int adr2, ofs, ofs2, offset, pageoffset;
    They should all be off_t.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  13. #58
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    This compiles (only warnings are about unused variables, unknown pragmas and various enum values not handled in switch, if I add -Wall) and works with both these compile commands on an et8000:

    Code:
     gcc main.c -o grab -lpng -ljpeg
    Code:
    gcc -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 main.c -o grab64 -lpng -ljpeg
    main.zip


    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

Page 4 of 4 FirstFirst ... 234

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.