}
#endif
int main()
{
static FILE *ogg_fp = NULL;
static ogg_stream_state ogg_os;
static ogg_packet op;
static ogg_page og;
static th_enc_ctx *td;
static th_info ti;
th_comment tc;
int buf_delay=-1;
static int video_fps_numerator = 24;
static int video_fps_denominator = 1;
ogg_uint32_t keyframe_frequency = 64;
unsigned int w = 520;
unsigned int h = 380;
// Starting process
ogg_fp = fopen("test.ogv", "wb");
if (!ogg_fp) {
fprintf(stderr, "error creating ogv file\n");
return 1;
}
srand(time(NULL));
if (ogg_stream_init(&ogg_os, rand())) {
fprintf(stderr, "error: couldn't create ogg stream state\n");
return 1;
}
th_info_init(&ti);
ti.frame_width = 528;
ti.frame_height = 384;
ti.pic_width = w;
ti.pic_height = h;
ti.pic_x = 0;
ti.pic_y = 0;
ti.fps_numerator = 24;
ti.fps_denominator = 1;
ti.aspect_numerator = 0;
ti.aspect_denominator = 0;
ti.colorspace = TH_CS_UNSPECIFIED;
ti.pixel_fmt = TH_PF_444;
ti.target_bitrate = 6000000;
ti.quality = 0;
ti.keyframe_granule_shift = 6;
td = th_encode_alloc(&ti);
th_info_clear(&ti);
int ret = th_encode_ctl(td, TH_ENCCTL_SET_KEYFRAME_FREQUENCY_FORCE, &keyframe_frequency, sizeof(keyframe_frequency-1));
if (ret < 0) {
fprintf(stderr, "Could not set keyframe interval to %d.\n", (int)keyframe_frequency);
}
int arg = TH_RATECTL_CAP_UNDERFLOW;
ret = th_encode_ctl(td, TH_ENCCTL_SET_RATE_FLAGS, &arg, sizeof(arg));
if (ret < 0)
fprintf(stderr,"Could not set encoder flags for --soft-target\n");
if (buf_delay < 0) {
int var1 = keyframe_frequency*7>>1;
int var2 = 5*video_fps_numerator/video_fps_denominator;
if (var1 > var2)
arg = keyframe_frequency*7>>1;
else
arg = 5*video_fps_numerator/video_fps_denominator;
ret = th_encode_ctl(td, TH_ENCCTL_SET_RATE_BUFFER, &arg, sizeof(arg));
if (ret < 0)
fprintf(stderr,"Could not set rate control buffer for --soft-target\n");
}
if (buf_delay >= 0) {
ret = th_encode_ctl(td, TH_ENCCTL_SET_RATE_BUFFER, &buf_delay, sizeof(buf_delay));
if (ret < 0) {
fprintf(stderr,"Warning: could not set desired buffer delay.\n");
}
}
/* write the bitstream header packets with proper page interleave */
th_comment_init(&tc);
/* first packet will get its own page automatically */
if (th_encode_flushheader(td, &tc, &op) <= 0){
fprintf(stderr,"Internal Theora library error.\n");
exit(1);
}
ogg_stream_packetin(&ogg_os,&op);
if (ogg_stream_pageout(&ogg_os, &og) != 1) {
fprintf(stderr,"Internal Ogg library error.\n");
exit(1);
}
fwrite(og.header, 1, og.header_len, ogg_fp);
fwrite(og.body, 1, og.body_len, ogg_fp);
/* create the remaining theora headers */
for(;;) {
ret = th_encode_flushheader(td, &tc, &op);
if (ret < 0) {
fprintf(stderr,"Internal Theora library error.\n");
exit(1);
} else if (!ret)
break;
ogg_stream_packetin(&ogg_os, &op);
}
for(;;) {
int result = ogg_stream_flush(&ogg_os, &og);
if (result < 0) {
/* can't get here */
fprintf(stderr,"Internal Ogg library error.\n");
exit(1);
}
if (result == 0)
break;
fwrite(og.header, 1, og.header_len, ogg_fp);
fwrite(og.body, 1, og.body_len, ogg_fp);
}
// Ending process
th_encode_free(td);
if (ogg_stream_flush(&ogg_os, &og)) {
fwrite(og.header, og.header_len, 1, ogg_fp);
fwrite(og.body, og.body_len, 1, ogg_fp);
}
if (ogg_fp) {
fflush(ogg_fp);
if (ogg_fp != stdout)
fclose(ogg_fp);
}
ogg_stream_clear(&ogg_os);
return 0;
}
tupi-0.2-git06/Doxyfile 0000775 0001750 0001750 00000021570 12657115252 015305 0 ustar xtingray xtingray # Doxyfile 1.4.1-KDevelop
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = Tupi
PROJECT_NUMBER = 0.1
OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = Spanish
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = YES
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 1
ALIASES = "english=@if english" \
"spanish=@if spanish" \
endenglish=@endif \
endspanish=@endif
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = YES
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS = spanish
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = src \
doc
FILE_PATTERNS = *.cpp \
*.h \
*.dox
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = qmake_* \
*.moc \
moc_*
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = doc/images
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = doc/doxydoc
HTML_FILE_EXTENSION = .html
HTML_HEADER = doc/common/header.html
HTML_FOOTER = doc/common/footer.html
HTML_STYLESHEET = doc/common/tupi.css
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = letter
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE = tupi.tag
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = YES
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 400
MAX_DOT_GRAPH_HEIGHT = 400
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
tupi-0.2-git06/INSTALL 0000664 0001750 0001750 00000005327 12657115252 014627 0 ustar xtingray xtingray Note: Just for now, the Tupi project is only available for Unix systems.
We hope to port it to many other platforms in the future. Meanwhile, the
best way to try it is from any GNU/Linux distro (and FreeBSD or Unix-alike
systems).
1. Dependencies
The compilation process of any software usually requires a set of specific
tools previously installed in your system. Those additional components are
called "dependencies".
In this case, before you start to compile Tupi, you must ensure to get
installed the next list of dependencies in your computer:
* build-essential: All the C/C++ free compilers, libraries and utilities
required to create a binary from any Unix-alike C/C++ source code (gcc,
g++, cpp, make, etc)
* Qt: The full development toolkit used to create Tupi
* ruby: A script language used to do the configuration process previous
to the compilation
* libavcodec-dev: A subcomponent of the project libav, to deal with
video manipulation
* libavformat-dev: A subcomponent of the project libav, to deal with
video manipulation
* zlib-dev: A file-compression library
* quazip: A very handy API to deal with zip files
For Ubuntu users (version 10.10) with some experience using the console,
these are the commands they should run to install Tupi dependencies:
- Open a terminal (from Aplications -> Accesories) and type:
% sudo apt-get install build-essential [Press enter]
% sudo apt-get install ruby [Press enter]
% sudo apt-get install libavcodec-dev libavformat-dev [Press enter]
% sudo apt-get install libqt5-gui qt5-qmake qt5-dev-tools [Press enter]
% sudo apt-get install zlib1g-dev [Press enter]
% sudo apt-get install libquazip0-dev [Press enter]
Note: If you are not using Ubuntu, check for the equivalent packages for your
Linux distro
2. Get the source code and compile it
- Get the Tupi source code from our Download section
(http://www.maefloresta.com/portal/downloads). Then,
run these commands:
% tar xvfz tupi-XXX.tar.gz [Press enter]
% cd tupi-XXX [Press enter]
% ./configure --prefix=/usr/local/tupi [Press enter]
% make [Press enter]
% sudo make install [Press enter]
Note: Only for advanced users, the configure script provides many options
useful to set specific installation paths. Try "./configure --help" to get
more information about it.
3. Animation time!
- Execute:
% /usr/local/tupi/bin/tupi & [Press enter]
Or look for the launcher from Applications -> Graphics -> Tupi
And enjoy Tupi!
Note: Whether you find any error in this how-to or you want to share your own
installation notes with us, feel free to send us your documents.
Additional info: http://www.maefloresta.com
tupi-0.2-git06/win.pri 0000664 0001750 0001750 00000000176 12657115253 015105 0 ustar xtingray xtingray CONFIG += release
#DEFINES += K_DEBUG HAVE_LIBAV
DEFINES += HAVE_LIBAV
contains(DEFINES, K_DEBUG) {
CONFIG += console
}
tupi-0.2-git06/INSTALL.osx 0000664 0001750 0001750 00000003557 12657115252 015442 0 ustar xtingray xtingray * Warning: Guide pending for update!
Tupi basic installation guide for Mac OSX
Note: Currently, to build and install Tupi on Mac OSX the Terminal application
is required. This tool can be located at /Applications/Utilities/Terminal using
the Finder application.
The Terminal is just a command console, so if you have no experience using it,
we recommend you to take a look at this little guide:
http://www.hacktheday.com/beginners-guide-to-apple-terminal-part-1/
Now, to compile/install Tupi from source code, please follow the instructions
below:
1. Install the XCode Developer Tools available at:
https://developer.apple.com/downloads/index.action
If your OSX version is Lion, try version 4.1 or later and include the
package called "Command Line Tools for Xcode"
If your OSX version is Snow Leopard, try version 3.2 or later
Note: an Apple ID account is required to download XCode
2. Install the Macports (package manager) available at:
http://www.macports.org/
Read the installation instructions at:
http://www.macports.org/install.php
3. Install required ports:
$ sudo port install zlib
$ sudo port install ffmpeg +nonfree
$ sudo port install aspell
$ sudo port install git-core
$ sudo port install qt4-mac
4. Download Tupi source code from Gitorious:
$ git clone -b experimental https://git.gitorious.org/tupi/tupi.git
5. Move into project's directory:
$ cd tupi
6. Run the configure script:
$ ./configure --prefix=/opt/local --bindir=/opt/local/bin/ --libdir=/opt/local/lib
--sharedir=/opt/local/share --with-debug
7. Compile the project:
$ make
8. Install binaries and resources:
$ sudo make install
9. Run Tupi:
/opt/local/bin/tupi
TODO:
1. To make Tupi port file for Macports
2. To build App Bundle for easy install (.dmg)
tupi-0.2-git06/.gitignore 0000775 0001750 0001750 00000004606 12657115252 015570 0 ustar xtingray xtingray *.obj
*.o
*.so
*.a
*.moc
*.0
*.1
*.dylib
*.pro.user
moc_*
.qmake.stash
bin/
src/framework/tgui/qrc_tgui_images.cpp
configure.tests/aspell/Makefile
configure.tests/aspell/aspell
configure.tests/ffmpeg/Makefile
configure.tests/ffmpeg/ffmpeg
configure.tests/opengl/Makefile
configure.tests/opengl/opengl
configure.tests/zlib/Makefile
configure.tests/zlib/zlib
configure.tests/theora/theora
configure.tests/quazip/quazip
src/framework/tupconfig.pri
tupiglobal.pri
launcher/tupi
launcher/tupi.desktop
3rdparty/Makefile
3rdparty/potrace/Makefile
3rdparty/quazip/Makefile
Makefile
src/Makefile
src/components/Makefile
src/components/animation/Makefile
src/components/colorpalette/Makefile
src/components/debug/Makefile
src/components/export/Makefile
src/components/exposure/Makefile
src/components/help/Makefile
src/components/import/Makefile
src/components/kinas/Makefile
src/components/library/Makefile
src/components/paintarea/Makefile
src/components/pen/Makefile
src/components/scenes/Makefile
src/components/timeline/Makefile
src/components/twitter/Makefile
src/framework/Makefile
src/framework/tcore/Makefile
src/framework/tgui/Makefile
src/framework/tsound/Makefile
src/libbase/Makefile
src/libtupi/Makefile
src/libui/Makefile
src/net/Makefile
src/plugins/Makefile
src/plugins/export/Makefile
src/plugins/export/ffmpegplugin/Makefile
src/plugins/export/genericexportplugin/Makefile
src/plugins/export/smilexportplugin/Makefile
src/plugins/filters/Makefile
src/plugins/import/Makefile
src/plugins/tools/Makefile
src/plugins/tools/coloringtool/Makefile
src/plugins/tools/common/Makefile
src/plugins/tools/compoundtool/Makefile
src/plugins/tools/contourselectiontool/Makefile
src/plugins/tools/erasertool/Makefile
src/plugins/tools/filltool/Makefile
src/plugins/tools/geometrictool/Makefile
src/plugins/tools/inktool/Makefile
src/plugins/tools/opacitytool/Makefile
src/plugins/tools/penciltool/Makefile
src/plugins/tools/polylinetool/Makefile
src/plugins/tools/positiontool/Makefile
src/plugins/tools/rotationtool/Makefile
src/plugins/tools/scaletool/Makefile
src/plugins/tools/schemetool/Makefile
src/plugins/tools/selecttool/Makefile
src/plugins/tools/sheartool/Makefile
src/plugins/tools/texttool/Makefile
src/plugins/tools/viewtool/Makefile
src/shell/Makefile
src/store/Makefile
src/themes/Makefile
src/themes/default/Makefile
src/themes/default/cursors/Makefile
src/themes/default/icons/Makefile
src/themes/default/images/Makefile
tupi-0.2-git06/doc/ 0000775 0001750 0001750 00000000000 12657115253 014335 5 ustar xtingray xtingray tupi-0.2-git06/doc/common/ 0000775 0001750 0001750 00000000000 12657115253 015625 5 ustar xtingray xtingray tupi-0.2-git06/doc/common/headerbg.png 0000664 0001750 0001750 00000000604 12657115253 020074 0 ustar xtingray xtingray ‰PNG
IHDR x u¢ùo bKGD ÿ ÿ ÿ ½§“ pHYs ÒÝ~ü tIMEÖ9”ªÆE IDATxÚíÔ±
DQF°ƒ%lj0;(•
VÐiÞárùqõv|’r©Vàß÷V@Q@P@DAQ@P@DAQ@P@DAQ@P@DQ@P@DAQ@P@DAQ@P@DAQ@P@DQ@DQ@P@DAQ@P@DAQ@P@DAQ@P@DQ@P@DAQ@P@DAQ@P@„Wïµë‡Â IEND®B`‚ tupi-0.2-git06/doc/common/header.html 0000664 0001750 0001750 00000001253 12657115253 017744 0 ustar xtingray xtingray
$title ($projectname)
tupi-0.2-git06/doc/common/bottom.png 0000664 0001750 0001750 00000000264 12657115253 017641 0 ustar xtingray xtingray ‰PNG
IHDR ; X(û; bKGD ÿ ÿ ÿ ½§“ pHYs d_‘ tIMEÖSni AIDAT8Ëcüÿÿ?6ÀÄ€ŒJŒJe ~f$1F6ư°°ÿ$Åøcª‰:~þü‰]bäZ>ZúP. È7kßk
{ IEND®B`‚ tupi-0.2-git06/doc/common/background.png 0000664 0001750 0001750 00000000324 12657115253 020451 0 ustar xtingray xtingray ‰PNG
IHDR |\ë sBITÛáOà PLTEëëëßß߇á pHYs ÒÝ~ü tEXtCreation Time 08/09/04WW"” %tEXtSoftware Macromedia Fireworks MX 2004‡v¬Ï IDATxœcøÿÿƒ •Ø ?)¤ÂÒ IEND®B`‚ tupi-0.2-git06/doc/common/footer.html 0000664 0001750 0001750 00000000534 12657115253 020013 0 ustar xtingray xtingray
This file is part of the documentation for $projectname $projectnumber.
Documentation copyright © 2005-2006 the Tupi Team.