mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-23 23:26:49 +03:00
Fplay: Makefile
git-svn-id: svn://kolibrios.org@5021 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b11c1b148c
commit
73882958a8
64
contrib/media/fplay/Makefile
Normal file
64
contrib/media/fplay/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
|
||||
NAME= Fplay
|
||||
|
||||
FASM= fasm.exe
|
||||
CC = kos32-gcc
|
||||
AR = kos32-ar
|
||||
LD = kos32-ld
|
||||
CPP= kos32-g++
|
||||
STRIP = kos32-strip
|
||||
|
||||
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer
|
||||
|
||||
ARFLAG = crs
|
||||
|
||||
SDK_DIR:= $(abspath ../../sdk)
|
||||
LIB_DIR:= $(SDK_DIR)/lib
|
||||
|
||||
|
||||
INCLUDES= -I. -I$(SDK_DIR)/sources/newlib/libc/include -I$(SDK_DIR)/sources/ffmpeg -I$(SDK_DIR)/sources/freetype/include
|
||||
|
||||
LIBS:= -lavdevice.dll -lavformat.dll -lavcodec.dll -lavutil.dll -lswscale.dll
|
||||
LIBS+= -lswresample.dll -lsound -lpixlib.dll -lfreetype.dll -lgcc -lc.dll -lapp
|
||||
|
||||
LIBPATH:= -L$(LIB_DIR) -L/home/autobuild/tools/win32/mingw32/lib
|
||||
|
||||
LDFLAGS = -static -nostdlib --stack 0x200000 -T$(SDK_DIR)/sources/newlib/app.lds --image-base 0
|
||||
|
||||
SOURCES = opendial.asm \
|
||||
audio.c \
|
||||
fplay.c \
|
||||
utils.c \
|
||||
video.c \
|
||||
skin/skin.asm \
|
||||
winlib/button.c \
|
||||
winlib/caption.c \
|
||||
winlib/fontlib.c \
|
||||
winlib/frame.c \
|
||||
winlib/panel.c \
|
||||
winlib/window.c
|
||||
|
||||
OBJECTS = $(patsubst %.asm, %.o, $(patsubst %.c, %.o, $(SOURCES)))
|
||||
|
||||
|
||||
# targets
|
||||
|
||||
all:$(NAME)
|
||||
|
||||
$(NAME): $(OBJECTS) Makefile
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS)
|
||||
kos32-objcopy $@ -O binary
|
||||
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
||||
|
||||
%.o : %.asm Makefile
|
||||
$(FASM) $< $@
|
||||
|
||||
|
||||
clean:
|
||||
-rm -f *.o
|
||||
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "../winlib/winlib.h"
|
||||
#include "winlib/winlib.h"
|
||||
#include "sound.h"
|
||||
#include "fplay.h"
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
#include <kos32sys.h>
|
||||
#include "../winlib/winlib.h"
|
||||
#include "winlib/winlib.h"
|
||||
|
||||
#include "sound.h"
|
||||
#include "fplay.h"
|
||||
@ -142,12 +142,8 @@ int main( int argc, char *argv[])
|
||||
}
|
||||
else movie_file = file_name;
|
||||
|
||||
|
||||
// __asm__ __volatile__("int3");
|
||||
|
||||
// dump_format(pFormatCtx, 0, argv[1], 0);
|
||||
|
||||
// stream_duration = 1000.0 * pFormatCtx->duration * av_q2d(AV_TIME_BASE_Q);
|
||||
stream_duration = pFormatCtx->duration;
|
||||
|
||||
printf("duration %f\n", (double)stream_duration);
|
||||
@ -156,17 +152,12 @@ int main( int argc, char *argv[])
|
||||
audioStream=-1;
|
||||
for(i=0; i < pFormatCtx->nb_streams; i++)
|
||||
{
|
||||
// pFormatCtx->streams[i]->discard = AVDISCARD_ALL;
|
||||
|
||||
if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO
|
||||
&& videoStream < 0)
|
||||
{
|
||||
videoStream=i;
|
||||
video_time_base = pFormatCtx->streams[i]->time_base;
|
||||
if(stream_duration == 0)
|
||||
// stream_duration = 1000.0 *
|
||||
// pFormatCtx->streams[i]->duration *
|
||||
// av_q2d(pFormatCtx->streams[i]->time_base);
|
||||
stream_duration = pFormatCtx->streams[i]->duration;
|
||||
|
||||
}
|
||||
@ -175,11 +166,7 @@ int main( int argc, char *argv[])
|
||||
{
|
||||
audioStream=i;
|
||||
if(stream_duration == 0)
|
||||
// stream_duration = 1000.0 *
|
||||
// pFormatCtx->streams[i]->duration *
|
||||
// av_q2d(pFormatCtx->streams[i]->time_base);
|
||||
stream_duration = pFormatCtx->streams[i]->duration;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -359,8 +346,6 @@ static int fill_queue()
|
||||
int err = 0;
|
||||
AVPacket packet;
|
||||
|
||||
// __asm__ __volatile__("int3");
|
||||
|
||||
while( (q_video.size < 4*1024*1024) &&
|
||||
!err )
|
||||
err = load_frame();
|
||||
@ -399,8 +384,6 @@ void decoder()
|
||||
{
|
||||
int err;
|
||||
|
||||
// __asm__ __volatile__("int3");
|
||||
|
||||
switch(decoder_state)
|
||||
{
|
||||
case PREPARE:
|
||||
@ -498,10 +481,6 @@ void decoder()
|
||||
ret = avformat_seek_file(pFormatCtx, -1, INT64_MIN,
|
||||
rewind_pos, INT64_MAX, 0);
|
||||
|
||||
// ret = avformat_seek_file(pFormatCtx, -1, min_pos,
|
||||
// rewind_pos, max_pos, opts);
|
||||
// __asm__ __volatile__("int3");
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("could not seek to position %f\n",
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <libswscale/swscale.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include "../winlib/winlib.h"
|
||||
#include "winlib/winlib.h"
|
||||
#include "fplay.h"
|
||||
|
||||
extern uint32_t hw2d ;
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <libswscale/swscale.h>
|
||||
#include <libavutil/imgutils.h>
|
||||
#include <kos32sys.h>
|
||||
#include "../winlib/winlib.h"
|
||||
#include "winlib/winlib.h"
|
||||
#include <sound.h>
|
||||
#include "fplay.h"
|
||||
#include <math.h>
|
||||
@ -1017,6 +1017,3 @@ void render_draw_client(render_t *render)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <memory.h>
|
||||
//#include <memory.h>
|
||||
//#include "font_droid.h"
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
@ -135,7 +135,7 @@ int init_fontlib()
|
||||
// err = FT_New_Face( library, "/hd0/1/IstokWeb.ttf", 0, &face );
|
||||
|
||||
err = FT_New_Memory_Face( library, res_def_font, 277996, 0, &face );
|
||||
printf("err %d\n", err);
|
||||
printf("err %d\n", err);
|
||||
if ( err == FT_Err_Unknown_File_Format )
|
||||
{
|
||||
printf("font format is unsupported\n");
|
||||
@ -157,8 +157,6 @@ done:
|
||||
return (int)face;
|
||||
};
|
||||
|
||||
// draw_text(face,"/hd0/1/demo", 10, 80, 0x00000000);
|
||||
|
||||
|
||||
unsigned int ansi2utf32(unsigned char ch)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user