• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

audio/H18-Jun-2001-5,5254,635

video/H03-May-2022-13,3028,576

CHANGESH A D18-Jun-200115 KiB324309

COPYINGH A D26-Aug-199924.7 KiB482399

MPEG.cppH A D18-Jun-200110.7 KiB507404

MPEG.hH A D27-Apr-20014.3 KiB13673

MPEGaction.hH A D04-Apr-20013.9 KiB14096

MPEGaudio.hH A D03-May-20229.9 KiB379242

MPEGerror.hH A D26-Aug-19991.5 KiB6330

MPEGfilter.cH A D24-Sep-200011.7 KiB382243

MPEGfilter.hH A D05-Sep-20002.2 KiB6827

MPEGlist.cppH A D06-Jun-2000878 6148

MPEGlist.hH A D18-May-2000831 4624

MPEGring.cppH A D27-Apr-20016.5 KiB260163

MPEGring.hH A D18-May-20002.7 KiB9536

MPEGstream.cppH A D24-May-20016.9 KiB349226

MPEGstream.hH A D27-Apr-20012.9 KiB11751

MPEGsystem.cppH A D27-Apr-200136.1 KiB1,4591,088

MPEGsystem.hH A D27-Apr-20013.1 KiB11861

MPEGvideo.hH A D04-Apr-20013.5 KiB11058

Makefile.amH A D04-Apr-20011.7 KiB9365

Makefile.inH A D18-Jun-200121.8 KiB695551

READMEH A D16-Apr-20012.5 KiB7546

README.SDL_mixerH A D05-Oct-20001.2 KiB3928

TODOH A D24-Apr-2000221 64

acinclude.m4H A D19-Apr-200121.3 KiB626583

aclocal.m4H A D24-Apr-200131.5 KiB907840

autogen.shH A D30-May-2000109 94

config.guessH A D17-Jan-200138.6 KiB1,4031,214

config.subH A D17-Jan-200126.8 KiB1,3561,217

configureH A D03-May-2022127.5 KiB4,2443,496

configure.inH A D24-Apr-20017.6 KiB299265

glmovie-tile.cH A D10-Nov-20009 KiB264158

glmovie.cH A D04-Oct-20002.9 KiB11989

glmovie.hH A D21-Oct-1999409 2418

gtv.1H A D03-Jan-20001 KiB3025

gtv.cH A D03-May-202244 KiB1,3191,051

gtv.hH A D11-May-2000341 2718

install-shH A D21-Oct-19995.5 KiB252153

ltconfigH A D22-May-200198.6 KiB3,1682,452

ltmain.shH A D22-May-2001108.7 KiB4,0433,036

missingH A D21-Oct-19996.1 KiB191154

mkinstalldirsH A D21-Oct-1999726 4123

plaympeg.1H A D03-Feb-20001.6 KiB5751

plaympeg.cH A D27-Apr-200124.2 KiB894720

smpeg-config.inH A D11-Dec-20001.2 KiB6255

smpeg.cppH A D04-Apr-20018.8 KiB339212

smpeg.hH A D04-Apr-20017.3 KiB20882

smpeg.m4H A D03-May-20226.2 KiB194181

smpeg.spec.inH A D14-Jun-20002.2 KiB9173

README

1
2                      SDL MPEG Player Library (SMPEG)
3
4                             Version 0.4.4
5                           September 28, 2000
6
7
8Written by Karl Robillard and Sam Lantinga, Loki Software, Inc.
9Streaming MPEG support contributed by Vivien Chappelier.
10
11SMPEG is a free MPEG1 video player library with sound support.  Video playback
12is based on the ubiquitous Berkeley MPEG player, mpeg_play v2.2.  Audio is
13played through a slightly modified mpegsound library, part of Splay v0.8.2.
14SMPEG supports MPEG audio (MP3), MPEG-1 video, and MPEG system streams.
15
16This library is distributed under the GNU Library Public License (LGPL)
17version 2.
18
19plaympeg, gtv, and glmovie are simple video players provided to test the
20library.  The C library interface is 'documented' in smpeg.h, and the C++
21library interface is spread out over the MPEG*.h files.
22
23This is a work in progress.  Only 16 or 32 bit color depth is supported.
24The player will dynamically conver to other color depths, but playback
25will be much faster if your display is already set to 16 bit color depth.
26Currently it has only been tested on Linux.
27
28
29Requirements:
30
31	* Simple DirectMedia Layer v1.2.0 or newer
32		http://www.libsdl.org/
33
34To make:
35
36	Type 'make all'.  This should build libsmpeg.a and plaympeg
37
38Usage:
39
40	plaympeg [--noaudio] [--novideo] [--double|-2] [--loop|-l] file ...
41
42
43Known Issues:
44
45	The MPEG decoding is a fairly slow and mathematically intensive
46	process.  It could use even further optimization.
47
48	There isn't any synchronization between the audio and video threads,
49	and system stream timestamps are ignored.  The video is synchronized
50	with audio by using video framerate and elapsed time.  They are
51	are synchronized well enough for short clips, but long movies, or
52	movies with visual audio cues (like speech) don't look very good.
53
54Reporting bugs:
55
56	Please report any bugs and/or fixes to smpeg@lokigames.com.
57
58
59Looking at the code:
60
61	The functions that should be optimized to improve performance are:
62		Color16DitherImageMod() (Uses 5ms CPU, called few times)
63		Twox2Color16DitherImageMod() (Uses 10ms CPU, called few times)
64		j_rev_dct()         (Uses 0.01ms CPU, but called many times)
65		ParseReconBlock()   (Uses 0.01ms CPU, but called many times)
66
67	To improve framerate scheduling, look at timeSync() in video/gdith.cpp
68
69Links:
70
71	Berkeley MPEG player   http://bmrc.berkeley.edu/frame/research/mpeg
72	Splay                  http://my.netian.com/~polarb
73	SDL                    http://www.libsdl.org/
74
75

README.SDL_mixer

1
2There is no longer explicit support for the SDL_mixer library.
3
4You can have the SDL mixer library mix audio from a movie by hooking into
5the SDL mixer music hooks:
6
7#include "smpeg.h"
8#include "SDL_mixer.h"
9
10        .. set up the mixer audio ...
11
12        /* Note the last parameter is zero! */
13        mpeg = SMPEG_new("file.mpg", &info, 0);
14
15        /* Play the movie, using SDL_mixer for audio */
16        SMPEG_enableaudio(mpeg, 0);
17        if ( play_audio ) {
18                SDL_AudioSpec audiofmt;
19                Uint16 format;
20                int freq, channels;
21
22                /* Tell SMPEG what the audio format is */
23                Mix_QuerySpec(&freq, &format, &channels);
24                audiofmt.format = format;
25                audiofmt.freq = freq;
26                audiofmt.channels = channels;
27                SMPEG_actualSpec(mpeg, &audiofmt);
28
29                /* Hook in the MPEG music mixer */
30                Mix_HookMusic(SMPEG_playAudioSDL, mpeg);
31                SMPEG_enableaudio(mpeg, 1);
32        }
33        SMPEG_play(mpeg);
34
35        /* Stop the movie and unhook SMPEG from the mixer */
36        SMPEG_stop(mpeg);
37        Mix_HookMusic(NULL, NULL);
38
39