Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 05b800c

Browse files
committed
add
1 parent 017e76e commit 05b800c

12 files changed

+73
-0
lines changed
File renamed without changes.

‎AudioVideo/SDL.md‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
typora-copy-images-to: ./image
3+
---
4+
5+
## SDL
6+
7+
### 简介
8+
9+
SDL(Simple DirectMedia Layer)库的作用就是封装了复杂的音视频底层交互工作,简化了音视频处理的难度。
10+
11+
**特点:** 开源、跨平台。
12+
13+
### 结构
14+
15+
![SDL结构](image/SDL结构.png)
16+
17+
它是对底层进行了封装,最终还是调用的平台底层接口与硬件进行交互。
18+
19+
### SDL 流程
20+
21+
![SDL流程](image/SDL流程.jpg)
22+
23+
### SDL 主要函数
24+
25+
| 函数 | 简介 |
26+
| -------------------- | -------------------------- |
27+
| SDL_Init() | 初始化 SDL 系统。 |
28+
| SDL_CreateWindow() | 创建窗口 SDL_Window。 |
29+
| SDL_CreateRenderer() | 创建渲染器 SDL_Renderer。 |
30+
| SDL_CreateTexture() | 创建纹理 SDL_Texture。 |
31+
| SDL_UpdateTexture() | 设置纹理数据。 |
32+
| SDL_RenderCopy() | 将纹理的数据拷贝给渲染器。 |
33+
| SDL_RenderPresent() | 显示。 |
34+
| SDL_Delay() | 工具函数,用于延时。 |
35+
| SDL_Quit() | 退出 SDL 系统。 |
36+
37+
### SDL 数据结构
38+
39+
![SDL数据结构](image/SDL数据结构.jpg)
40+
41+
**数据结构简介:**
42+
43+
| 结构 | 简介 |
44+
| ------------ | -------------------- |
45+
| SDL_Window | 代表一个"窗口"。 |
46+
| SDL_Renderer | 代表一个"渲染器"。 |
47+
| SDL_Texture | 代表一个"纹理"。 |
48+
| SDL_Rect | 一个简单的矩形结构。 |
49+
50+
### SDL 事件和多线程
51+
52+
#### **SDL 多线程**
53+
54+
| 函数 | 简介 |
55+
| ------------------ | -------------- |
56+
| SDL_CreateThread() | 创建一个线程。 |
57+
| SDL_Thread() | 线程的句柄。 |
58+
59+
#### **SDL 事件**
60+
61+
**函数:**
62+
63+
| 函数 | 简介 |
64+
| --------------- | -------------- |
65+
| SDL_WaitEvent() | 等待一个事件。 |
66+
| SDL_PushEvent() | 发送一个事件。 |
67+
68+
**数据结构:**
69+
70+
| 结构 | 简介 |
71+
| ----------- | -------------- |
72+
| SDL_Event() | 代表一个事件。 |
73+

‎AudioVideo/image/SDL数据结构.jpg‎

30.9 KB
Loading[フレーム]

‎AudioVideo/image/SDL流程.jpg‎

68.3 KB
Loading[フレーム]

‎AudioVideo/image/SDL结构.png‎

289 KB
Loading[フレーム]
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /