Framebuffer的配置及应用——先转载留着,以后一定要弄懂-程序员宅基地

技术标签: 操作系统  嵌入式  

http://blog.csdn.net/tju355/article/details/6881389
 
借助于framebuffer,我们能够在console下面作很多事情。首先下载framebuffer的配置工具fbset:
# apt-get install fbset 下载完毕后,配置文件/etc/fb.modes随之产生。

比较简单的作法是用万能的vesafb,如果它被编译进了内核,如:
Device Drivers -> Graphics support ->
  • VESA VGA graphics support
    那么在grub内核引导那一行的后面加上vga=791 它的含义是VESA framebuffer console @ 1024x768x64k,进入系统后可以直接使用framebuffer,看一下这种情况下的各项数据:
    # fbset -s
    mode "1024x768-76"
        # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz
        geometry 1024 768 1024 768 16
        timings 12714 128 32 16 4 128 4
        rgba 5/11,6/5,5/0,0/0
    endmode

    用具体显卡的framebuffer驱动是另一种选择,拿Nvidia显卡为例,Nvidia显卡的xorg驱动模块与其framebuffer的驱动模块是互相排斥的,如果要用一个就必须清除另一个:
    # rmmod nvidia
    装载nvidia的framebuffer驱动:
    # modprobe nvidiafb
    装载成功的时候,会产生/dev/fb0设备,console屏幕上的字体会有变化。
    看一下当前的配置:
    # fbset -s
    mode "1024x768-85"
        # D: 94.500 MHz, H: 68.677 kHz, V: 84.997 Hz
        geometry 1024 768 1024 32767 8
        timings 10582 208 48 36 1 96 3
        hsync high
        vsync high
        accel true
        rgba 8/0,8/0,8/0,0/0
    endmode

    需要改变一下geometry及色深:
    # fbset -g 1024 768 1024 768 32
    # fbset -s
    mode "1024x768-85"
        # D: 94.500 MHz, H: 68.677 kHz, V: 84.997 Hz
        geometry 1024 768 1024 768 32
        timings 10582 208 48 36 1 96 3
        hsync high
        vsync high
        accel true
        rgba 8/16,8/8,8/0,8/24
    endmode

    我们把它与使用VESA ramebuffer后的数据比较一下,显然,根据具体的显卡来驱动framebuffer可以在颜色上达到最佳值,好,现在我们在console下面能够作的事情:
    一、视频播放,可以用mplayer 或者 fbxine:
    # mplayer -vo fbdev -vf scale=1024:768 video_file.avi
    -vo fbdev 是告诉mplayer用framebuffer作视频驱动.
    -vf scale=1024:768 是全屏的方法,可按屏幕的具体情况作调整
    用fbxine的话需要下载:
    # apt-get install xine-console
    二、图片文件与pdf文件浏览:
    # apt-get install fbi
    用这个软件包里的fbi可以浏览图片,fbgs可以观看pdf文件:
    # fbi -a *jpg
    # fbgs -c *pdf
    三、中文显示:
    # apt-get install jfbterm
    # jfbterm
    中文显示的效果完美。

    文章出处:飞诺网(http://www.diybl.com/course/6_system/linux/Linuxjs/2008721/133651.html)

    ------------------------------------------------------------------------
    在内核Documentation/fb/vesafb.txt文件中,有如下vesa-framebuffer的说明
    Switching modes is done using the vga=... boot parameter. Read
    Documentation/svga.txt for details.
    You should compile in both vgacon (for text mode) and vesafb (for
    graphics mode). Which of them takes over the console depends on
    whenever the specified mode is text or graphics.
    The graphic modes are NOT in the list which you get if you boot with
    vga=ask and hit return. The mode you wish to use is derived from the
    VESA mode number. Here are those VESA mode numbers:
    | 640x480 800x600 1024x768 1280x1024
    ----+-------------------------------------
    256 | 0x101 0x103 0x105 0x107 8位色
    32k | 0x110 0x113 0x116 0x119 15位色
    64k | 0x111 0x114 0x117 0x11A 16位色
    16M | 0x112 0x115 0x118 0x11B 24位色
    The video mode number of the Linux kernel is the VESA mode number plus
    0x200.
    Linux_kernel_mode_number = VESA_mode_number + 0x200
    So the table for the Kernel mode numbers are:
    | 640x480 800x600 1024x768 1280x1024
    ----+-------------------------------------
    256 | 0x301 0x303 0x305 0x307 8位色
    32k | 0x310 0x313 0x316 0x319 15位色
    64k | 0x311 0x314 0x317 0x31A 16位色
    16M | 0x312 0x315 0x318 0x31B 24位色
    To enable one of those modes you have to specify "vga=ask" in the
    lilo.conf file and rerun LILO. Then you can type in the desired
    mode at the "vga=ask" prompt. For example if you like to use 
    1024x768x256 colors you have to say "305" at this prompt.
    If this does not work, this might be because your BIOS does not support
    linear framebuffers or because it does not support this mode at all.
    Even if your board does, it might be the BIOS which does not. VESA BIOS
    Extensions v2.0 are required, 1.2 is NOT sufficient. You will get a
    "bad mode number" message if something goes wrong.
    1. Note: LILO cannot handle hex, for booting directly with 
    "vga=mode-number" you have to transform the numbers to decimal.
    2. Note: Some newer versions of LILO appear to work with those hex values,
    if you set the 0x in front of the numbers.
    本文来自程序员宅基地,转载请标明出处:http://blog.csdn.net/songbohr/archive/2010/03/25/5415637.aspx
  • 这两天拾起以前做过的Framebuffer,不相同的是以前在嵌入式上做的,现在在自己电脑上Debian上进行测试,不过都类似罢了,嵌入式里要初始化很多东西。下面具体列一下步骤。至于Framebuffer的原理,就我的理解是比较简单的,无非往mmap好的fb上填写显示数据罢了,不对这些数据进行处理,FrameBuffer 只是一个提供显示内存和显示芯片寄存器从物理内存映射到进程地址空间中的设备,它需要真正的显卡驱动的支持。在这次测试中,我用了默认就安装的vesafb,好像又被称为万能Fb驱动。

     

    1、   首先在系统Grub启动时按e进入命令启动行的编辑模式,改为:kernel /boot/vmlinuz-2.6.18-5-686 root=/dev/sda6 ro vga=791(vga=791表示fb用1024 * 768 * 16bpp,其他模式的参数可以上网查查);

     

    2、   进入系统的命令行模式,编译fb测试例子:gcc fb_test.c;

     

    3、   允许测试例子:sudo ./a.out >> fb.txt(必须要用超级用户权限,>>将屏幕打印写到fb.txt中),效果如下:

     

    打印如下:

     

     

    Fixed screen info:
        id: VESA VGA
        smem_start: 0xf0000000
        smem_len: 3145728
        type: 0
        type_aux: 0
        visual: 2
        xpanstep: 0
        ypanstep: 0
        ywrapstep: 0
        line_length: 2048
        mmio_start: 0x0
        mmio_len: 0
        accel: 0

    Variable screen info:
        xres: 1024
        yres: 768
        xres_virtual: 1024
        yres_virtual: 768
        yoffset: 0
        xoffset: 0
        bits_per_pixel: 16
        grayscale: 0
        red: offset: 11, length: 5, msb_right: 0
        green: offset: 5, length: 6, msb_right: 0
        blue: offset: 0, length: 5, msb_right: 0
        transp: offset: 0, length: 0, msb_right: 0
        nonstd: 0
        activate: 0
        height: -1
        width: -1
        accel_flags: 0x0
        pixclock: 12714
        left_margin: 128
        right_margin: 32
        upper_margin: 16
        lower_margin: 4
        hsync_len: 128
        vsync_len: 4
        sync: 0
        vmode: 0

    Frame Buffer Performance test...
            Average: 2508 usecs
            Bandwidth: 1196.172 MByte/Sec
            Max. FPS: 398.724 fps

     

     

    4、还可以通过fb在命令行模式下看视频,如:sudo mplayer –vo fbdev ./air_nessesity.mpg。

    1. #include <stdlib.h>
    2. #include <unistd.h>
    3. #include <stdio.h>
    4. #include <fcntl.h>
    5. #include <linux/fb.h>
    6. #include <linux/kd.h>
    7. #include <sys/mman.h>
    8. #include <sys/ioctl.h>
    9. #include <sys/time.h>
    10. #include <string.h>
    11. #include <errno.h>
    12. struct fb_var_screeninfo vinfo;
    13. struct fb_fix_screeninfo finfo;
    14. char *frameBuffer = 0;
    15. //打印fb驱动中fix结构信息,注:在fb驱动加载后,fix结构不可被修改。
    16. void
    17. printFixedInfo ()
    18. {
    19.     printf ("Fixed screen info:\n"
    20.             "\tid: %s\n"
    21.             "\tsmem_start: 0x%lx\n"
    22.             "\tsmem_len: %d\n"
    23.             "\ttype: %d\n"
    24.             "\ttype_aux: %d\n"
    25.             "\tvisual: %d\n"
    26.             "\txpanstep: %d\n"
    27.             "\typanstep: %d\n"
    28.             "\tywrapstep: %d\n"
    29.             "\tline_length: %d\n"
    30.             "\tmmio_start: 0x%lx\n"
    31.             "\tmmio_len: %d\n"
    32.             "\taccel: %d\n"
    33.             "\n",
    34.             finfo.id, finfo.smem_start, finfo.smem_len, finfo.type,
    35.             finfo.type_aux, finfo.visual, finfo.xpanstep, finfo.ypanstep,
    36.             finfo.ywrapstep, finfo.line_length, finfo.mmio_start,
    37.             finfo.mmio_len, finfo.accel);
    38. }
    39. //打印fb驱动中var结构信息,注:fb驱动加载后,var结构可根据实际需要被重置
    40. void
    41. printVariableInfo ()
    42. {
    43.     printf ("Variable screen info:\n"
    44.             "\txres: %d\n"
    45.             "\tyres: %d\n"
    46.             "\txres_virtual: %d\n"
    47.             "\tyres_virtual: %d\n"
    48.             "\tyoffset: %d\n"
    49.             "\txoffset: %d\n"
    50.             "\tbits_per_pixel: %d\n"
    51.             "\tgrayscale: %d\n"
    52.             "\tred: offset: %2d, length: %2d, msb_right: %2d\n"
    53.             "\tgreen: offset: %2d, length: %2d, msb_right: %2d\n"
    54.             "\tblue: offset: %2d, length: %2d, msb_right: %2d\n"
    55.             "\ttransp: offset: %2d, length: %2d, msb_right: %2d\n"
    56.             "\tnonstd: %d\n"
    57.             "\tactivate: %d\n"
    58.             "\theight: %d\n"
    59.             "\twidth: %d\n"
    60.             "\taccel_flags: 0x%x\n"
    61.             "\tpixclock: %d\n"
    62.             "\tleft_margin: %d\n"
    63.             "\tright_margin: %d\n"
    64.             "\tupper_margin: %d\n"
    65.             "\tlower_margin: %d\n"
    66.             "\thsync_len: %d\n"
    67.             "\tvsync_len: %d\n"
    68.             "\tsync: %d\n"
    69.             "\tvmode: %d\n"
    70.             "\n",
    71.             vinfo.xres, vinfo.yres, vinfo.xres_virtual, vinfo.yres_virtual,
    72.             vinfo.xoffset, vinfo.yoffset, vinfo.bits_per_pixel,
    73.             vinfo.grayscale, vinfo.red.offset, vinfo.red.length,
    74.             vinfo.red.msb_right, vinfo.green.offset, vinfo.green.length,
    75.             vinfo.green.msb_right, vinfo.blue.offset, vinfo.blue.length,
    76.             vinfo.blue.msb_right, vinfo.transp.offset, vinfo.transp.length,
    77.             vinfo.transp.msb_right, vinfo.nonstd, vinfo.activate,
    78.             vinfo.height, vinfo.width, vinfo.accel_flags, vinfo.pixclock,
    79.             vinfo.left_margin, vinfo.right_margin, vinfo.upper_margin,
    80.             vinfo.lower_margin, vinfo.hsync_len, vinfo.vsync_len,
    81.             vinfo.sync, vinfo.vmode);
    82. }
    83. //画大小为width*height的同色矩阵,8alpha+8reds+8greens+8blues
    84. void
    85. drawRect_rgb32 (int x0, int y0, int width, int height, int color)
    86. {
    87.     const int bytesPerPixel = 4;
    88.     const int stride = finfo.line_length / bytesPerPixel;
    89.     int *dest = (int *) (frameBuffer)
    90.         + (y0 + vinfo.yoffset) * stride + (x0 + vinfo.xoffset);
    91.     int x, y;
    92.     for (y = 0; y < height; ++y)
    93.     {
    94.         for (x = 0; x < width; ++x)
    95.         {
    96.             dest[x] = color;
    97.         }
    98.         dest += stride;
    99.     }
    100. }
    101. //画大小为width*height的同色矩阵,5reds+6greens+5blues
    102. void
    103. drawRect_rgb16 (int x0, int y0, int width, int height, int color)
    104. {
    105.     const int bytesPerPixel = 2;
    106.     const int stride = finfo.line_length / bytesPerPixel;
    107.     const int red = (color & 0xff0000) >> (16 + 3);
    108.     const int green = (color & 0xff00) >> (8 + 2);
    109.     const int blue = (color & 0xff) >> 3;
    110.     const short color16 = blue | (green << 5) | (red << (5 + 6));
    111.     short *dest = (short *) (frameBuffer)
    112.         + (y0 + vinfo.yoffset) * stride + (x0 + vinfo.xoffset);
    113.     int x, y;
    114.     for (y = 0; y < height; ++y)
    115.     {
    116.         for (x = 0; x < width; ++x)
    117.         {
    118.             dest[x] = color16;
    119.         }
    120.         dest += stride;
    121.     }
    122. }
    123. //画大小为width*height的同色矩阵,5reds+5greens+5blues
    124. void
    125. drawRect_rgb15 (int x0, int y0, int width, int height, int color)
    126. {
    127.     const int bytesPerPixel = 2;
    128.     const int stride = finfo.line_length / bytesPerPixel;
    129.     const int red = (color & 0xff0000) >> (16 + 3);
    130.     const int green = (color & 0xff00) >> (8 + 3);
    131.     const int blue = (color & 0xff) >> 3;
    132.     const short color15 = blue | (green << 5) | (red << (5 + 5)) | 0x8000;
    133.     short *dest = (short *) (frameBuffer)
    134.         + (y0 + vinfo.yoffset) * stride + (x0 + vinfo.xoffset);
    135.     int x, y;
    136.     for (y = 0; y < height; ++y)
    137.     {
    138.         for (x = 0; x < width; ++x)
    139.         {
    140.             dest[x] = color15;
    141.         }
    142.         dest += stride;
    143.     }
    144. }
    145. void
    146. drawRect (int x0, int y0, int width, int height, int color)
    147. {
    148.     switch (vinfo.bits_per_pixel)
    149.     {
    150.     case 32:
    151.         drawRect_rgb32 (x0, y0, width, height, color);
    152.         break;
    153.     case 16:
    154.         drawRect_rgb16 (x0, y0, width, height, color);
    155.         break;
    156.     case 15:
    157.         drawRect_rgb15 (x0, y0, width, height, color);
    158.         break;
    159.     default:
    160.         printf ("Warning: drawRect() not implemented for color depth %i\n",
    161.                 vinfo.bits_per_pixel);
    162.         break;
    163.     }
    164. }
    165. #define PERFORMANCE_RUN_COUNT 5
    166. void
    167. performSpeedTest (void *fb, int fbSize)
    168. {
    169.     int i, j, run;
    170.     struct timeval startTime, endTime;
    171.     unsigned long long results[PERFORMANCE_RUN_COUNT];
    172.     unsigned long long average;
    173.     unsigned int *testImage;
    174.     unsigned int randData[17] = {
    175.         0x3A428472, 0x724B84D3, 0x26B898AB, 0x7D980E3C, 0x5345A084,
    176.         0x6779B66B, 0x791EE4B4, 0x6E8EE3CC, 0x63AF504A, 0x18A21B33,
    177.         0x0E26EB73, 0x022F708E, 0x1740F3B0, 0x7E2C699D, 0x0E8A570B,
    178.         0x5F2C22FB, 0x6A742130
    179.     };
    180.     printf ("Frame Buffer Performance test...\n");
    181.     for (run = 0; run < PERFORMANCE_RUN_COUNT; ++run)
    182.     {
    183.         /* Generate test image with random(ish) data: */
    184.         testImage = (unsigned int *) malloc (fbSize);
    185.         j = run;
    186.         for (i = 0; i < (int) (fbSize / sizeof (int)); ++i)
    187.         {
    188.             testImage[i] = randData[j];
    189.             j++;
    190.             if (j >= 17)
    191.                 j = 0;
    192.         }
    193.         gettimeofday (&startTime, NULL);
    194.         memcpy (fb, testImage, fbSize);
    195.         gettimeofday (&endTime, NULL);
    196.         long secsDiff = endTime.tv_sec - startTime.tv_sec;
    197.         results[run] =
    198.             secsDiff * 1000000 + (endTime.tv_usec - startTime.tv_usec);
    199.         free (testImage);
    200.     }
    201.     average = 0;
    202.     for (i = 0; i < PERFORMANCE_RUN_COUNT; ++i)
    203.         average += results[i];
    204.     average = average / PERFORMANCE_RUN_COUNT;
    205.     printf (" Average: %llu usecs\n", average);
    206.     printf (" Bandwidth: %.03f MByte/Sec\n",
    207.             (fbSize / 1048576.0) / ((double) average / 1000000.0));
    208.     printf (" Max. FPS: %.03f fps\n\n",
    209.             1000000.0 / (double) average);
    210.     /* Clear the framebuffer back to black again: */
    211.     memset (fb, 0, fbSize);
    212. }
    213. int
    214. main (int argc, char **argv)
    215. {
    216.     const char *devfile = "/dev/fb0";
    217.     long int screensize = 0;
    218.     int fbFd = 0;
    219.     /* Open the file for reading and writing */
    220.     fbFd = open (devfile, O_RDWR);
    221.     if (fbFd == -1)
    222.     {
    223.         perror ("Error: cannot open framebuffer device");
    224.         exit (1);
    225.     }
    226.     //获取finfo信息并显示
    227.     if (ioctl (fbFd, FBIOGET_FSCREENINFO, &finfo) == -1)
    228.     {
    229.         perror ("Error reading fixed information");
    230.         exit (2);
    231.     }
    232.     printFixedInfo ();
    233.     //获取vinfo信息并显示
    234.     if (ioctl (fbFd, FBIOGET_VSCREENINFO, &vinfo) == -1)
    235.     {
    236.         perror ("Error reading variable information");
    237.         exit (3);
    238.     }
    239.     printVariableInfo ();
    240.     /* Figure out the size of the screen in bytes */
    241.     screensize = finfo.smem_len;
    242.     /* Map the device to memory */
    243.     frameBuffer =
    244.         (char *) mmap (0, screensize, PROT_READ | PROT_WRITE, MAP_SHARED,
    245.                      fbFd, 0);
    246.     if (frameBuffer == MAP_FAILED)
    247.     {
    248.         perror ("Error: Failed to map framebuffer device to memory");
    249.         exit (4);
    250.     }
    251.     //测试virt fb的性能
    252.     performSpeedTest (frameBuffer, screensize);
    253.     printf ("Will draw 3 rectangles on the screen,\n"
    254.             "they should be colored red, green and blue (in that order).\n");
    255.     drawRect (vinfo.xres / 8, vinfo.yres / 8,
    256.              vinfo.xres / 4, vinfo.yres / 4, 0xffff0000);
    257.     drawRect (vinfo.xres * 3 / 8, vinfo.yres * 3 / 8,
    258.              vinfo.xres / 4, vinfo.yres / 4, 0xff00ff00);
    259.     drawRect (vinfo.xres * 5 / 8, vinfo.yres * 5 / 8,
    260.              vinfo.xres / 4, vinfo.yres / 4, 0xff0000ff);
    261.     sleep (5);
    262.     printf (" Done.\n");
    263.     munmap (frameBuffer, screensize);    //解除内存映射,与mmap对应
    264.     close (fbFd);
    265.     return 0;
    266. }
    复制代码
 
0
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_33890499/article/details/85844617

智能推荐

Cocos2d-x 窗口大小调整_cocos2dx设置窗口大小-程序员宅基地

文章浏览阅读4.2k次。打开src目录下的AppDelegate.cpp文件,若无修改则在第45行处找到全局声明的Size变量,修改`designResolutionSize`中的大小即可。_cocos2dx设置窗口大小

springboot接收枚举值的默认方式_springboot get请求怎么接收前端传递的枚举数字-程序员宅基地

文章浏览阅读1.6k次。测试代码:@PostMapping() public void test(@RequestBody Student student){ System.out.println(student.getLover().name()); }class Student{ private Lover lover; public Lover getLover() { return lover; } public void setLover_springboot get请求怎么接收前端传递的枚举数字

【数学建模笔记】【第七讲】多元线性回归分析(二):虚拟变量的设置以及交互项的解释,以及基于Stata的普通回归与标准化回归分析实例_stata两个虚拟变量的交互项-程序员宅基地

文章浏览阅读1.5w次,点赞24次,收藏120次。简单来说就是去量纲后的回归(因为你要比较不同变量之间的显著性的大小,那么带着量纲怎么比,所以先把量纲去掉,然后再比较)官话:为了更为精准的研究影响评价量的重要因素(去除量纲的影响),我们可考虑使用标准化回归系数。_stata两个虚拟变量的交互项

mysql-程序员宅基地

文章浏览阅读203次。有时候安装mysql后使用mysql命令时报错 Can't connect to MySQL server on localhost (10061),或者用net start mysql 时报服务名无效,一般是因为mysql服务没有启动。这时候可以用管理身份运行cmd.exe(注意必须是管理..._c:\program files\mysql\mysql server 5.6\bin>mysqld --install install/remove

亚信科技java笔试题答案_亚信笔试题卷以及答案.docx-程序员宅基地

文章浏览阅读6.2k次,点赞3次,收藏44次。亚信联创科技校园招聘B 卷考试时间60_分钟 _考试方式(闭)卷(本试卷满分 100 分,答案请写在答题卡上)请不要在问卷上答题或涂改,笔试结束后请务必交回试卷部分内容分值备注一、计算机基础40分C/C++语言基础40分技能部分二、二选一JAVA 语言基础40分三、数据库20分总分100 分第一部分——计算机基础一、选择题(每题 2 分,总分 40分)1.CPU 状态分为目态和管态两种..._亚信科技java实习笔试题

三线城市程序员的薪资待遇怎么样?我分享提高java技术水平的几个方法_三线城市学java-程序员宅基地

文章浏览阅读1.3k次。3年对一个程序员来说是非常重要的。像我自己本身就是做程序员的,目前的薪资待遇是13K左右,虽然在我所在的公司不是最高的,但在所在的这个城市的消费水平来说,除了日常的开支,包括房租、水电、伙食、人际交往等费用之外,还能留下一部分闲钱自己存起来。不同城市的薪资待遇是不一样的,这主要是由于当地的消费水平和经济发展水平不同,所以如果你想要更高的薪资待遇,就要考虑在一线城市或者经济发达的城市工作。一个有着丰富工作经验的程序员,他的技能水平、经验和能力都比没有经验的程序员更加出色,所以他们的薪资待遇也会更高一些。_三线城市学java

随便推点

恭迎万亿级营销(圈人)潇洒的迈入毫秒时代 - 万亿user_tags级实时推荐系统数据库设计...-程序员宅基地

文章浏览阅读418次。标签PostgreSQL , 标签 , 推荐系统 , 实时圈人 , 数组 , gin , gist , 索引 , rum , tsvector , tsquery , 万亿 , user , tag , 淘宝背景我们仅用了PostgreSQL的两个小特性,却解决了业务困扰已久的大问题。推荐系统是广告营销平台的奶牛,其核心是精准、实时、..._实时圈人

软件测试风险追踪表_软件测试风险管理表格-程序员宅基地

文章浏览阅读430次。软件测试风险追踪表风险追踪表 项目名称: 填制人: 编号 风险描述 影响 风险等级 发生的可能性 应对策略 状态 责任人 备注 ..._软件测试风险管理表格

AAC ADTS封装实现-程序员宅基地

文章浏览阅读1.2k次。一、AAC音频格式种类有哪些AAC音频格式是一种由MPEG-4标准定义的有损音频压缩格式。AAC包含两种格式 ADIF(Audio Data Interchange Format音频数据交换格式)和ADTS(Audio Data transport Stream音频数据传输流)。ADIF特点:可以确定的找到音视频数据的开始,不需要进行在音视频数据流中间开始的解码,它的解码必须在明确的定义开始。应用场景:常用在磁盘文件中。ADTS特点:具有同步字的比特流,解码可以在这个流中任何位置开始。类似于mp_aac adts

Unity基础概念_unity基本概念-程序员宅基地

文章浏览阅读213次。像要使用Resouce类,必须创建一个 Resouce 文件夹,然后把需要的资源放进去,才可以在代码中设置路径进行访问_unity基本概念

在gitlab中指定自定义 CI/CD 配置文件_gitlab配置cicd-程序员宅基地

文章浏览阅读2.4k次。指定自定义 CI/CD 配置文件,顾名思义就是在项目中指定文件来代替默认的.gitlab-ci.yml文件的方式来运行流水线。以往我们在使用流水线的时候,都是默认将.gitlab-ci.yml文件存在在项目的跟路径下,但是我们也可以指定备用文件名路径,或者不想在每个项目中来维护这个yml文件,那么通过自定义 CI/CD 配置文件便可以实现。_gitlab配置cicd

mysql出现#1063 - Incorrect column specifier for column 'id'的解决方法_sql 错误 [1063] [42000]: incorrect column specifier -程序员宅基地

文章浏览阅读1w次。出现这个表示如果设置了自动增长,字段类型应该设置为int整型。_sql 错误 [1063] [42000]: incorrect column specifier for column 'id' incorrec