原文链接为 http://wiki.libsdl.org/Introduction

由于近期整理音视频可视化的技术,发现好久不更新的SDL发布了2.0版本,以前也没有过于关注,这里准备尝试下。了解SDL到底支持哪些功能。

本文部分内容为翻译内容。有任何不当支持请联系我。

SDL全名Simple DirectMedia Layer (SDL)。官网:http://www.libsdl.org/

What can SDL do? SDL功能简介

Read ahead for an overview of what SDL is capable of. If you're simply interested in the changes from 1.2 to 2.0, check out theMigration Guide.

Video 视频

  • 3D graphics(3D图像处理):

    • SDL can be used in combination with the OpenGL API or Direct3D API for 3D graphics
    • 在处理三维图形的时候,SDL可以与OpenGL APi或Direct 3D配合使用。
  • Accelerated 2D render API(优化的2D渲染API):
    • Supports easy rotation, scaling and alpha blending, all accelerated using modern 3D APIs
    • 支持简单旋转、缩放和alpha叠加,所有加速都是基于现代的3D API。
    • Acceleration is supported using OpenGL and Direct3D, and there is a software fallback
    • 硬件加速是基于OpenGL和Direct3D的
  • Create and manage multiple windows(支持多窗口管理及创建)

Input Events 输入事件

  • Events and API functions provided for(为下列输入提供了事件及API函数接口):

    • Application and window state changes 应用程序和窗口状态改变
    • Mouse input 鼠标输入
    • Keyboard input 键盘输入
    • Joystick and game controller input 手柄和游戏控制器输入
    • Multitouch gestures 多点触控手势
  • Each event can be enabled or disabled with SDL_EventState()

  • 每个事件都可以使用SDL_EventState()使能或禁用

  • Events are passed through a user-specified filter function before being posted to the internal event queue
  • 在放入事件队列之前,所有事件会首先经过用户自定义的处理函数
  • Thread-safe event queue 线程安全的事件队列

Force Feedback 强制反馈

  • Force feedback is supported under Windows, Mac OS X and Linux

Audio 音频

  • Set audio playback of 8-bit and 16-bit audio, mono stereo or 5.1 surround sound, with optional conversion if the format is not supported by the hardware
  • 支持8位、16位,单声道、立体声或5.1环绕声的播放,同时在硬件不支持特定格式时提供可选的转换。
  • Audio runs independently in a separate thread, filled via a user callback mechanism
  • 音频处理运行在独立的线程中,通过自定义回调函数实现数据填充。
  • Designed for custom software audio mixers, but SDL_mixer provides a complete audio/music output library

  • 为自定义的软件音频混音器设计,但SDL_mixer提供完整的音频/音乐输出接口。

File I/O Abstraction 文件I/O抽象机制

  • General purpose abstraction for opening, reading and writing data
  • 提供打开、读取、写入数据的通用文件抽象框架
  • Built-in support for files and memory 内置支持文件和内存

Shared Object Support 共享对象支持

  • Load shared objects (DLL on Windows, .dylib on Mac OS X, .so on Linux)
  • 支持加载共享对象(windows下的DLL,Mac OS X下的.dylib,Linux下的.so)
  • Lookup functions in shared objects 支持在共享对象中查找函数

Threads 线程机制

  • Simple thread creation API 支持简单的线程创建函数
  • Simple thread local storage API 支持简单的线程局部存储机制
  • Mutexes, semaphores and condition variables 提供互斥量、信号量和条件变量
  • Atomic operations for lockless programming 提供原子操作函数

Timers 定时器

  • Get the number of milliseconds elapsed 支持获取消耗的时间(单位毫秒)
  • Wait a specified number of milliseconds 等待指定长度的时间(精度毫秒)
  • Create timers that run alongside your code in a separate thread
  • 支持创建在独立线程运行的定时器
  • Use high resolution counter for profiling 支持高精度计数器

CPU Feature Detection CPU功能检测

  • Query the number of CPUs 可获取CPU个数
  • Detect CPU features and supported instruction sets 可获取CPU支持的功能及指令集

Endian Independence 大端小端支持

  • Detect the endianness of the current system 可获取系统的是大端还是小端
  • Routines for fast swapping of data values 提供快速数据交换的例程
  • Read and write data of a specified endianness 提供针对特定端的读写数据机制

Power Management 电源管理

  • Querying power management status 支持获取电源管理状态

What platforms does SDL run on? SDL支持的平台

Windows

  • Uses Win32 APIs for display, taking advantage of Direct3D for hardware acceleration
  • 使用Win32 API显示,可充分利用Direct3D提供的硬件加速
  • Uses DirectSound and XAudio2 for sound 使用DirectSound和XAudio2处理音频

Mac OS X

  • Uses Cocoa for video display, taking advantage of OpenGL for hardware acceleration
  • 使用Cocoa进行视频显示,可充分利用OpenGL提供的硬件加速
  • Uses Core Audio for sound 使用Core Audio处理音频

Linux

  • Uses X11 for video display, taking advantage of OpenGL for hardware acceleration
  • 使用X11进行视频显示,可充分利用OpenGL提供的硬件加速
  • Uses the ALSA, OSS and PulseAudio APIs for sound

  • 使用ALSA、OSS、PulseAudio API处理音频

iOS

  • Uses UIKit for video display, taking advantage of OpenGL ES 2.0 for hardware acceleration
  • 使用UIKit进行视频显示,可充分利用OpenGL ES 2.0提供的硬件加速
  • Uses Core Audio for sound 使用Core Audio处理音频

Android

  • Uses JNI interfaces for video display, taking advantage of OpenGL ES 1.1 and 2.0 for hardware acceleration
  • 使用JNI接口进行硬件加速,可充分利用OpenGL ES 1.1、2.0提供的硬件加速
  • Uses JNI audio callbacks for sound 使用JNI音频回调函数处理音频
  • See also Android 其他详见Android

----------------------------------------------------------------------------------------------------------------------------

本文作者:Tocy  e-mail: zyvj@qq.com

版权所有@2015,请勿用于商业用途,转载请注明原文地址。本人保留所有权利

Beginning SDL 2.0(1) SDL功能简介的更多相关文章

  1. Beginning SDL 2.0(3) SDL介绍及BMP渲染

    SDL是一个跨平台的多媒体库.为了实现跨平台,SDL提供了一个简单的界面库抽象,比如提供了SDL_Window用于表示窗口句柄,SDL_Surface.SDL_Texture.SDL_Renderer ...

  2. vue2.0的常用功能简介

    路由跳转 当我们想要实现点击链接跳转时,可以使用$router来进行跳转 语法如下: '}}) 这里path是要跳转的路径,query里面是路径跳转时要携带的参数,以对象的形式存在 2 获取路由参数 ...

  3. Beginning SDL 2.0(4) YUV加载及渲染

    本文主要内容是基于的“Beginning SDL 2.0(3) SDL介绍及BMP渲染”(以下简称BS3)基础上,将BMP加载及渲染修改为YUV420或I420的原始视频格式.阅读完本部分内容相信你可 ...

  4. Beginning SDL 2.0(5) 基于MFC和SDL的YuvPlayer

    本文是在“Beginning SDL 2.0(4) YUV加载及渲染”(以下简称BS4)基础上做的功能完善,如果你对之间介绍的内容了解不多,麻烦先阅读之前的内容. 本文主要介绍如何完成一个基于MFC和 ...

  5. Beginning SDL 2.0(2) TwinklebearDev SDL 2.0 Tutorial

    本文整理并简要介绍了TwinklebearDev SDL 2.0 Tutorial相关内容(以下简称TDSDLTutorial). 这是作为我学习并了解SDL2.0功能一篇学习总结. TDSDLTut ...

  6. 管家婆软件工贸版(标准财务+进销存+生产管理)V18.0功能简介

    管家婆软件工贸版(标准财务+进销存+生产管理)V18.0功能简介 管家婆 工贸版(标准财务+进销存+生产管理) 1.整体介绍 管家婆工贸版系列软件是针对国内中小型生产加工企业,将ERP管理思想与几十万 ...

  7. 第四章 跨平台图像显示库——SDL 第一节 与SDL第一次亲密接触

    http://blog.csdn.net/visioncat/article/details/1596576 GCC for Win32 开发环境介绍(5) 第四章 跨平台图像显示库——SDL 第一节 ...

  8. HelloX操作系统网络功能简介及使用和开发指南

    HelloX网络功能简介及使用和开发指南 HelloX网络功能简介 作为物联网操作系统,网络功能是必备的核心功能之一.按照规划,HelloX实现了两个不同类型的TCP/IP协议栈,一个面向资源受限的嵌 ...

  9. 部分GDAL工具功能简介

    主要转自http://blog.csdn.net/liminlu0314?viewmode=contents 部分GDAL工具功能简介 gdalinfo.exe 显示GDAL支持的各种栅格文件的信息. ...

随机推荐

  1. Python基础教程【读书笔记】 - 2016/7/19

    希望通过博客园持续的更新,分享和记录Python基础知识到高级应用的点点滴滴! 第八波:第4章  字典:当索引不好用时 将学到一种通过名字引用值的数据结构,这种结构类型称为映射mapping.字典是P ...

  2. jdk RSA算法类使用

    package com.security.rsa; import java.security.Key;import java.security.KeyFactory;import java.secur ...

  3. 一.OSI与TCP

    一. TCP/IP的由来 OSI参考模型由来 计算机网络产生的最初阶段,每个计算机厂商都实现了自己的一套计算机网络体系结构;异构的网络之间无法进行通信.因此,ISO委员会推出了一种用于开放系统互联的网 ...

  4. Standing on Shouder of Giants

    Zachary_Fan 如何一步一步用DDD设计一个电商网站(二)-- 项目架构 http://www.cnblogs.com/Zachary-Fan/p/6012454.html HTTP 权威指南 ...

  5. 基于jquery的表单校验插件 - formvalidator使用体验

    下载地址:http://www.formvalidator.net/ 基本样例 <form action="/registration" method="POST& ...

  6. nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)

    启动nginx时报这个错 , 要么用root用户启动 , 要么在配置文件nginx.conf中将server下的listen端口改掉 , 因为在linux中端口号小于1024都是需要root权限的

  7. [C语言](一)第一个Windows 32 API的窗口程序

    #include <windows.h> LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int WINAPI WinMain( ...

  8. android Studio 快捷键(转载)

    http://www.cnblogs.com/ut2016-progam/p/5627142.html http://blog.csdn.net/shulianghan/article/details ...

  9. HTML5 规范

    1.内容类型(ContentType) HTML5扩展仍然为".html"或".htm",内容类型(ContentType)仍然为"text/html ...

  10. ajax 如何实现页面跳转

    老师,您好.jquery的ajax如何实现页面跳转?例如:登陆页面属于用户名和密码后,点击登陆,验证用户名和密码,正确后,跳转到其他页面.能否给个例子. 下面列了五个例子来详细说明,这几个例子的主要功 ...