Commit b780e711 authored by Loren Merritt's avatar Loren Merritt

print svn version number in SEI info and in CLI/VfW.


git-svn-id: svn://svn.videolan.org/x264/trunk@185 df754926-b1dd-0310-bc7b-ec298dee348c
parent ea9308c6
......@@ -91,18 +91,21 @@ checkasm: testing/checkasm.c libx264.a
%.o: %.asm
$(AS) $(ASFLAGS) -o $@ $<
.depend: $(SRCS) x264.c
.depend: $(SRCS) x264.c config.h
rm -f .depend
# Hacky - because gcc 2.9x doesn't have -MT
$(foreach SRC, $(SRCS) x264.c, ( echo -n "`dirname $(SRC)`/" && $(CC) $(CFLAGS) $(SRC) -MM -g0 ) 1>> .depend;)
config.h: $(wildcard .svn/entries */.svn/entries)
./version.sh
depend: .depend
ifneq ($(wildcard .depend),)
include .depend
endif
clean:
rm -f $(OBJS) $(OBJASM) *.a x264.o .depend x264 TAGS
rm -f $(OBJS) $(OBJASM) config.h *.a x264.o .depend x264 TAGS
distclean: clean
......
......@@ -98,6 +98,12 @@ $(DIR_BUILD):
@mkdir -p $(DIR_BUILD)/$(@D)
@$(CC) $(CFLAGS) -c -o $(DIR_BUILD)/$@ $<
encoder/set.c: config.h
config.h:
@echo " C: $@"
@cd $(DIR_SRC) && \
./version.sh
libx264.a: $(DIR_BUILD) $(OBJECTS)
@echo " L: $(@F)"
@cd $(DIR_BUILD) && \
......@@ -118,7 +124,7 @@ checkasm.exe: $(DIR_BUILD) libx264.a $(OBJECTS) testing/checkasm.obj
clean:
@echo " Cl: Object files and target lib"
@$(RM) $(DIR_BUILD)
@$(RM) $(DIR_BUILD) $(DIR_SRC)/config.h
install: x264.exe
install x264.h $(DIR_INSTALL)/include/
......
......@@ -35,6 +35,7 @@
#include "x264.h"
#include "common/bs.h"
#include "common/set.h"
#include "config.h"
void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
{
......@@ -403,8 +404,8 @@ void x264_sei_version_write( bs_t *s )
};
char version[256];
int length;
sprintf( version, "x264 - core %d - H.264/MPEG-4 AVC codec - Copyleft 2005 - http://www.videolan.org/x264.html",
X264_BUILD );
sprintf( version, "x264 - core %d%s - H.264/MPEG-4 AVC codec - Copyleft 2005 - http://www.videolan.org/x264.html",
X264_BUILD, X264_VERSION );
length = strlen(version)+1+16;
bs_write( s, 8, 0x5 ); // payload_type = user_data_unregistered
......
#!/bin/sh
VER=`svnversion .`
if [[ $VER && $VER != exported ]]
then echo "#define X264_VERSION \" svn-$VER\"" > config.h
else echo "#define X264_VERSION \"\"" > config.h
fi
......@@ -31,6 +31,7 @@
**************************************************************************/
#include "x264vfw.h"
#include "config.h"
#include <stdio.h> /* sprintf */
#include <commctrl.h>
......@@ -470,7 +471,7 @@ BOOL CALLBACK callback_about( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
case WM_INITDIALOG :
{
char temp[1024];
sprintf( temp, "Core %d, build %s %s", X264_BUILD, __DATE__, __TIME__ );
sprintf( temp, "Core %d%s, build %s %s", X264_BUILD, X264_VERSION, __DATE__, __TIME__ );
SetDlgItemText( hDlg, IDC_BUILD, temp );
break;
}
......
......@@ -43,6 +43,7 @@
#endif
#include "common/common.h"
#include "config.h"
#include "x264.h"
#define DATA_MAX 3000000
......@@ -124,8 +125,8 @@ int main( int argc, char **argv )
static void Help( x264_param_t *defaults )
{
fprintf( stderr,
"x264 build:%d\n"
"Syntax: x264 [options] [-o out.h26l] in.yuv widthxheigh\n"
"x264 build:%d%s\n"
"Syntax: x264 [options] [-o out.264] in.yuv widthxheigh\n"
"\n"
" -h, --help Print this help\n"
"\n"
......@@ -185,7 +186,7 @@ static void Help( x264_param_t *defaults )
" --quiet Quiet Mode\n"
" -v, --verbose Print stats for each frame\n"
"\n",
X264_BUILD,
X264_BUILD, X264_VERSION,
defaults->i_keyint_max,
defaults->i_keyint_min,
defaults->i_scenecut_threshold,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment