Multimedia Programming/ko: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Multimedia Programming/ko
| Old | New | Line | |
|---|---|---|---|
| 1 | + | # 비디오 재생 | |
| 2 | + | ||
| 3 | + | ## 동영상 재생 프로그램 작성 시작 | |
| 4 | + | ||
| 5 | + | 명령어 라인과 파라메터를 알고 있다면 동영상 플레이러를 시작하려면 TProcessUTF8을 사용할 수 있다: | |
| 6 | + | ||
| 7 | + | ``` pascal | |
| 8 | + | uses | |
| 9 | + | Classes, ..., LCLProc, UTF8Process; | |
| 10 | + | ||
| 11 | + | ... | |
| 12 | + | ||
| 13 | + | implementation | |
| 14 | + | ||
| 15 | + | procedure TMainForm.Button1Click(Sender: TObject); | |
| 16 | + | var | |
| 17 | + | Player: TProcessUTF8; | |
| 18 | + | begin | |
| 19 | + | Player:=TProcessUTF8.Create(nil); | |
| 20 | + | try | |
| 21 | + | Player.CommandLine:=PathToPlayer+' '+ParametersAndMediaFile; | |
| 22 | + | Player.Execute; | |
| 23 | + | finally | |
| 24 | + | Player.Free; | |
| 25 | + | end; | |
| 26 | + | end; | |
| 27 | + | ``` | |
| 28 | + | ||
| 29 | + | 예를 들어 리눅스 상에서 동영상 재생을 위해 mplayer로 시작하려면 다음과 같이 사용한다: | |
| 30 | + | ||
| 31 | + | ``` pascal | |
| 32 | + | uses | |
| 33 | + | Classes, ..., FileUtil, LCLProc, UTF8Process; | |
| 34 | + | ||
| 35 | + | ... | |
| 36 | + | ||
| 37 | + | implementation | |
| 38 | + | ||
| 39 | + | procedure TMainForm.Button1Click(Sender: TObject); | |
| 40 | + | var | |
| 41 | + | Player: TProcessUTF8; | |
| 42 | + | Filename: String; | |
| 43 | + | PlayerPath: String; | |
| 44 | + | PlayerParams: String; | |
| 45 | + | begin | |
| 46 | + | Filename:='/home/username/video.mpg'; | |
| 47 | + | PlayerPath:=FindDefaultExecutablePath('mplayer'); | |
| 48 | + | PlayerParams:='"'+Filename+'"'; | |
| 49 | + | Player:=TProcessUTF8.Create(nil); | |
| 50 | + | try | |
| 51 | + | Player.CommandLine:=PlayerPath+' '+PlayerParams; | |
| 52 | + | Player.Execute; | |
| 53 | + | finally | |
| 54 | + | Player.Free; | |
| 55 | + | end; | |
| 56 | + | end; | |
| 57 | + | ``` | |
| 58 | + | ||
| 59 | + | ## VFW - 비디오 포 윈도우즈 | |
| 60 | + | ||
| 61 | + | 윈도우 상에서 TV 카드나 윈도우의 비디오 스트림을 재생하거나 캡쳐 하려면 \[\[Glossary#VFW\| | |
| 62 | + | ||
| 63 | + | VFW\]\] [[Glossary|API를]] [[SysRec|SysRec와]] 함께 사용하면 된다. | |
| 64 | + | ||
| 65 | + | ## 리눅스 gkt2/X용 MPlayer | |
| 66 | + | ||
| 67 | + | **mplayer** 는 오픈소스 자유 동영상 플레이어로, mplayer를 포함하는 LCL 컨트롤이 있어서 자신만의 mplayer를 제작할 수도 있고 응용프로그램에서 바로 동영상을 플레이어하게 할 수 있다. | |
| 68 | + | ||
| 69 | + | 다음에서 다운로드 할 수 있다: | |
| 70 | + | ||
| 71 | + | svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/mplayer mplayer | |
| 72 | + | ||
| 73 | + | # 소리 재생 | |
| 74 | + | ||
| 75 | + | ## 윈도우만 해당: 윈도우즈 API를 이용 | |
| 76 | + | ||
| 77 | + | wav 파일 같은 것을 재생하려면 Windows API를 사용하여야 한다: | |
| 78 | + | ||
| 79 | + | ``` pascal | |
| 80 | + | ... | |
| 81 | + | uses MMSystem; | |
| 82 | + | ... | |
| 83 | + | sndPlaySound('C:\sounds\test.wav', snd_Async or snd_NoDefault); | |
| 84 | + | ``` | |
| 85 | + | ||
| 86 | + | 이것은 확실히 크로스-플랫폼이 될 수 없다 | |
| 87 | + | ||
| 88 | + | ## 오디오 컴포넌트 수트 사용 | |
| 89 | + | ||
| 90 | + | [[ACS|Audio Component Suite에]] 관한 페이지를 읽어보세요 | |
| 91 | + | ||
| 92 | + | ## OepnGL 라이브러리 이용 | |
| 93 | + | ||
| 94 | + | 델파이에 관한 튜토리얼을 다음에 있다: [1](http://www.noeska.com/doal/tutorials.aspx) | |
| 95 | + | ||
| 96 | + | 프리파스칼은 OpenAL을 접근하기 위한 유닛을 fpc/packages/openal과 [usage examples](http://svn.freepascal.org/svn/fpc/trunk/packages/openal/examples)에서 제공한다. | |
| 97 | + | ||
| 98 | + | ## BASS | |
| 99 | + | ||
| 100 | + | BASS 라이브러리는 <http://www.un4seen.com/> 과 <http://www.un4seen.com/forum/?topic=8682.0> 에서 다운로드 할 수가 있다. | |
| 101 | + | ||
| 102 | + | 윈도우즈, 리눅스 및 맥 OSX용 DJ 어플리케이션이 있는데 라자루스와 Bass 라이브러리를 이용하여 제작하였다: <https://sites.google.com/site/fiensprototyping/> | |
| 103 | + | ||
| 104 | + | ## Audiere 라이브러리 | |
| 105 | + | ||
| 106 | + | Audiere 라이브러리는 Delphi를 위한 바인딩을 가지지만 FPC와는 binding을 갖지 않는다: | |
| 107 | + | ||
| 108 | + | - <http://www.casteng.com/whypascal.shtml> | |
| 109 | + | - <http://www.afterwarp.net/resources/soundlib> | |
| 110 | + | - <http://code.google.com/p/audiere-bind-delphi/> | |
| 111 | + | ||
| 112 | + | ## Audorra 라이브러리 | |
| 113 | + | ||
| 114 | + | 라자루스와 잘 동작한다: | |
| 115 | + | ||
| 116 | + | <http://sourceforge.net/projects/audorra/> | |
| 117 | + | ||
| 118 | + | ## OMEGA 엔진 | |
| 119 | + | ||
| 120 | + | OMEGA 엔진은 겨우 50Kb의 단일 Omega.dll 파일로 완전한 게임 엔진을 제공한다. 이것은 FLAC,OGG,MP3,MP2,AMR 및 WMA 파일을 잘 재생하며 시스템에서 설치된 오디오 코덱을 찾아 이용한다. | |
| 121 | + | ||
| 122 | + | <http://sourceforge.net/projects/omega-engine/files/> | |
| 123 | + | ||
| 124 | + | 이제 프로젝트는 더 이상 진행되지 않으나 사용하기는 매우 쉽다: | |
| 125 | + | ||
| 126 | + | ``` pascal | |
| 127 | + | Media_Play('Music.mp3', TRUE); | |
| 128 | + | ``` | |
| 129 | + | ||
| 130 | + | ## PortAudio | |
| 131 | + | ||
| 132 | + | [PortAudio](http://www.portaudio.com/)는 다양한 툴과 동작하는 크로스-플랫폼, 오픈소스 라이브러리로 오디오 플레이백과 기록을 할 수 있다. | |
| 133 | + | ||
| 134 | + | [[http://wiki.lazarus.freepascal.org/Multimedia Programming|http://wiki.lazarus.freepascal.org/Multimedia_Programming#Playing_Sounds]] 에 여러 버전이 있다. | |
| 135 | + | ||
| 136 | + | 포럼 유저인 FredvS가 PortAudio를 동적으로 로드하는 파스칼 유닛을 작성하였다: | |
| 137 | + | ||
| 138 | + | [2](http://lazarus.freepascal.org/index.php/topic,17521.0.html) | |
| 139 | + | ||
| 140 | + | ## SDL + SDL_mixer | |
| 141 | + | ||
| 142 | + | 베이직 SDL 라이브러리는 매우 간단한 사운드 시스템이다. 그 최상위층에 SDL 믹서는 더 유연한 많은 사운드 API 들을 추가했다. | |
| 143 | + | ||
| 144 | + | ## FMOD | |
| 145 | + | ||
| 146 | + | FMOD는 폐쇄된 오픈소스 솔루션이다. 비 상업용 소프트웨어에는 무료로 사용할 수 있지만 상업적인 소프트웨어에서는 라이선스에 따른 비용을 지불하여야 한다. | |
| 147 | + | ||
| 148 | + | ## Squall 사운드 | |
| 149 | + | ||
| 150 | + | Squall 사운드는 FPC와 잘 동작한다. 3D 오디오와 EAX 효과를 포함하지만 MP3, OGG 및 WAV 포맷 만을 지원한다. | |
| 151 | + | ||
| 152 | + | <http://www.afterwarp.net/resources/soundlib> | |
| 153 | + | ||
| 154 | + | ## FPSound | |
| 155 | + | ||
| 156 | + | FPSound는 fpspreadsheet와 fpvectorial 상에서 개발 되고 있는 새로운 라이브러리이다: 파일을 읽고, 쓰고 플레이하는 독립적인 모듈을 가지며 편집을 위한 중간표시 단계도 가진다. [[FPSound|FPSound를]] 보세요 | |
| 157 | + | ||
| 158 | + | # 더 볼 것 | |
| 159 | + | ||
| 160 | + | - [[Audio libraries]] | |
| 161 | + | ||
| 162 | + | --- | |
| 163 | + | *From the Free Pascal wiki, page "Multimedia Programming/ko", as it stood on 2020-02-20 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
