Projects
home:blinry
nordlicht
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 45
View file
nordlicht.spec
Changed
@@ -1,7 +1,7 @@ %define soname 0 Name: nordlicht -Version: 0.3.3 +Version: 0.3.4 Release: 0 Summary: Creates colorful barcodes from video files License: GPL-2.0+
View file
_service:download_files:v0.3.3.tar.gz/packages
Deleted
-(directory)
View file
_service:download_files:v0.3.3.tar.gz/packages/archlinux
Deleted
-(directory)
View file
_service:download_files:v0.3.3.tar.gz/packages/archlinux/.gitignore
Deleted
@@ -1,7 +0,0 @@ -#* -#!.gitignore -#!**/PKGBUILD -*.tar.gz -*.tar.xz -src -pkg
View file
_service:download_files:v0.3.3.tar.gz/packages/archlinux/nordlicht
Deleted
-(directory)
View file
_service:download_files:v0.3.3.tar.gz/packages/archlinux/nordlicht-git
Deleted
-(directory)
View file
_service:download_files:v0.3.3.tar.gz/packages/archlinux/nordlicht-git/PKGBUILD
Deleted
@@ -1,27 +0,0 @@ -# Maintainer: Sebastian Morr <sebastian@morr.cc> - -pkgname=nordlicht-git -_gitname=nordlicht -pkgver=20140216 -pkgrel=1 -pkgdesc="Creates colorful moviebarcodes from video files, comes with a shared C library" -arch=('i686' 'x86_64') -url="http://github.com/blinry/nordlicht" -license=('GPL') -depends=('ffmpeg' 'libpng' 'popt') -makedepends=('git' 'cmake' 'help2man') -provides=('nordlicht') -conflicts=('nordlicht') -source=('git+https://github.com/blinry/nordlicht') -sha1sums=('SKIP') - -build() { - cd "$srcdir/$_gitname" - cmake -DCMAKE_INSTALL_PREFIX=/usr - make -} - -package() { - cd "$srcdir/$_gitname" - make DESTDIR="$pkgdir" install -}
View file
_service:download_files:v0.3.3.tar.gz/packages/archlinux/nordlicht/PKGBUILD
Deleted
@@ -1,24 +0,0 @@ -# Maintainer: Sebastian Morr <sebastian@morr.cc> - -pkgname=nordlicht -pkgver=0.3.1 -pkgrel=2 -pkgdesc="Creates colorful moviebarcodes from video files, comes with a shared C library" -arch=('i686' 'x86_64') -url="http://github.com/blinry/nordlicht" -license=('GPL') -depends=('ffmpeg' 'libpng' 'popt') -makedepends=('git' 'cmake' 'help2man') -source=(https://github.com/blinry/$pkgname/archive/v$pkgver.tar.gz) -md5sums=('2479c6eb5e6657ab16be6ec1b81347b7') - -build() { - cd "$pkgname-$pkgver" - cmake -DCMAKE_INSTALL_PREFIX=/usr - make -} - -package() { - cd "$pkgname-$pkgver" - make DESTDIR="$pkgdir" install -}
View file
_service:download_files:v0.3.3.tar.gz/.gitignore -> _service:download_files:v0.3.4.tar.gz/.gitignore
Changed
@@ -2,10 +2,12 @@ CMakeCache.txt CMakeFiles/ CTestTestfile.cmake +cmake_install.cmake libnordlicht.so +libnordlicht.so.* Makefile -cmake_install.cmake nordlicht +nordlicht.1 nordlicht.pc version.h
View file
_service:download_files:v0.3.3.tar.gz/CMakeLists.txt -> _service:download_files:v0.3.4.tar.gz/CMakeLists.txt
Changed
@@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8) project(nordlicht C) -set(NORDLICHT_VERSION 0.3.3) +set(NORDLICHT_VERSION 0.3.4) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") set(LIB_SUFFIX "" CACHE STRING "Suffix of library directory name (for example '32' or '64')")
View file
_service:download_files:v0.3.3.tar.gz/README.md -> _service:download_files:v0.3.4.tar.gz/README.md
Changed
@@ -16,8 +16,8 @@ ## Installation -- Arch Linux: Install the [`nordlicht-git`](https://aur.archlinux.org/packages/nordlicht-git/) package from the AUR -- Gentoo: Install the `media-video/nordlicht` package from the [multimedia overlay](https://gitorious.org/gentoo-multimedia/gentoo-multimedia) +- Arch Linux: Install the [`nordlicht`](https://aur.archlinux.org/packages/nordlicht/) package from the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository) +- Gentoo: Install the `media-video/nordlicht` package from the [multimedia overlay](https://gitorious.org/gentoo-multimedia/gentoo-multimedia), [here's how](https://www.gentoo.org/proj/en/overlays/userguide.xml) - On other distributions, get CMake, FFmpeg, libpng, [popt](http://freecode.com/projects/popt), and [help2man](https://www.gnu.org/software/help2man/), and issue: `mkdir build && cd build && cmake .. && make && make install` ## Usage
View file
_service:download_files:v0.3.3.tar.gz/src/graphics.c -> _service:download_files:v0.3.4.tar.gz/src/graphics.c
Changed
@@ -13,6 +13,12 @@ for(i=0; i<length; i++) { int lower = factor*i+0.5; int upper = factor*(i+1)-0.5; + + if (lower > upper) { + // this can happen when upscaling. pick nearest-neighbour entry: + lower = upper = factor*(i+0.5); + } + int rsum = 0; int gsum = 0; int bsum = 0; @@ -84,23 +90,3 @@ return c; } - -column* compress_to_diagonal(image *i) { - column *c; - c = malloc(sizeof(column)); - c->data = malloc(i->width*3); - c->length = i->width; - - float slope = 1.0*i->height/i->width; - - int x; - for (x=0; x<i->width; x++) { - int y = x*slope; - c->data[3*x+0] = i->data[y*i->width*3+3*x+0]; - c->data[3*x+1] = i->data[y*i->width*3+3*x+1]; - c->data[3*x+2] = i->data[y*i->width*3+3*x+2]; - } - - return c; -} -
View file
_service:download_files:v0.3.3.tar.gz/src/main.c -> _service:download_files:v0.3.4.tar.gz/src/main.c
Changed
@@ -18,7 +18,7 @@ void interesting_stuff(char *filename, char *output_file, int width, int height, nordlicht_style style, int live) { nordlicht *n = nordlicht_init(filename, width, height, live); - char *data = NULL; + unsigned char *data = NULL; if (n == NULL) { exit(1);
View file
_service:download_files:v0.3.3.tar.gz/src/nordlicht.c -> _service:download_files:v0.3.4.tar.gz/src/nordlicht.c
Changed
@@ -107,6 +107,8 @@ } int nordlicht_write(nordlicht *n, char *filename) { + int code = 0; + if (strcmp(filename, "") == 0) { error("Output filename must not be empty"); return -1; @@ -118,41 +120,45 @@ char *realpath_input = realpath(n->filename, NULL); if (strcmp(realpath_input, realpath_output) == 0) { error("Will not overwrite input file"); - return -1; + code = -1; } + free(realpath_input); free(realpath_output); + + if (code != 0) { + return code; + } } - int code = 0; FILE *fp; - png_structp png; - png_infop png_info; + png_structp png = NULL; + png_infop png_info = NULL; fp = fopen(filename, "wb"); if (fp == NULL) { error("Could not open '%s' for writing", filename); - code = 1; + code = -1; goto finalize; } png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (png == NULL) { error("Error writing PNG"); - code = 1; + code = -1; goto finalize; } png_info = png_create_info_struct(png); if (png_info == NULL) { error("Error writing PNG"); - code = 1; + code = -1; goto finalize; } if (setjmp(png_jmpbuf(png))) { error("Error writing PNG"); - code = 1; + code = -1; goto finalize; } png_init_io(png, fp); @@ -180,14 +186,15 @@ return n->progress; } -const char* nordlicht_buffer(nordlicht *n) { +const unsigned char* nordlicht_buffer(nordlicht *n) { return n->data; } -int nordlicht_set_buffer(nordlicht *n, char *data) { +int nordlicht_set_buffer(nordlicht *n, unsigned char *data) { + if (n->owns_data) { + free(n->data); + } n->owns_data = 0; - free(n->data); n->data = data; return 0; } -
View file
_service:download_files:v0.3.3.tar.gz/src/nordlicht.h -> _service:download_files:v0.3.4.tar.gz/src/nordlicht.h
Changed
@@ -23,11 +23,11 @@ // Returns a pointer to the nordlicht's internal buffer. You can use it to draw // the barcode while it is generated. -const char* nordlicht_buffer(nordlicht *n); +const unsigned char* nordlicht_buffer(nordlicht *n); // Replace the internal nordlicht's internal buffer. The data pointer is owned // by the caller and must be freed after `nordlicht_free`. Returns 0 on success. -int nordlicht_set_buffer(nordlicht *n, char *data); +int nordlicht_set_buffer(nordlicht *n, unsigned char *data); // Returns the size of this nordlicht's buffer in bytes. size_t nordlicht_buffer_size(nordlicht *n);
View file
_service:download_files:v0.3.3.tar.gz/src/video.c -> _service:download_files:v0.3.4.tar.gz/src/video.c
Changed
@@ -80,12 +80,6 @@ grab_next_frame(v); } -void seek_forward(video *v, long frame) { - double time_base = av_q2d(v->format_context->streams[v->video_stream]->time_base); - av_seek_frame(v->format_context, v->video_stream, frame/fps(v)/time_base, 0); - grab_next_frame(v); -} - int total_number_of_frames(video *v) { double duration_sec = 1.0*v->format_context->duration/AV_TIME_BASE; return fps(v)*duration_sec; @@ -182,8 +176,7 @@ v->has_index = 0; if (grab_next_frame(v) != 0) { - error("fuck"); - exit(1); + return NULL; } v->scaleframe = avcodec_alloc_frame();
View file
_service:download_files:v0.3.3.tar.gz/test/test-bin.sh -> _service:download_files:v0.3.4.tar.gz/test/test-bin.sh
Changed
@@ -60,6 +60,7 @@ # size pass ./nordlicht "$VIDEO" -w 1 -h 1 +pass ./nordlicht "$VIDEO" -w 1 -h 10000 fail ./nordlicht "$VIDEO" -w huuuge fail ./nordlicht "$VIDEO" -w 0 fail ./nordlicht "$VIDEO" -h 0 @@ -73,7 +74,6 @@ fail ./nordlicht "$VIDEO" -h 1,1 # output file -pass ./nordlicht "$VIDEO" -w 1 -o unicode.png pass ./nordlicht "$VIDEO" -w 1 -o ünîç⌀də.png pass test -f ünîç⌀də.png fail ./nordlicht "$VIDEO" -o ../"$TMP" @@ -86,9 +86,6 @@ fail ./nordlicht "$VIDEO" -s nope fail ./nordlicht "$VIDEO" -s '' -# exact seeking -pass ./nordlicht "$VIDEO" -w 1 -e - popd && rm -rv "$TMP" || exit 1 echo "All assertions passed. Yay!"
View file
_service:download_files:v0.3.3.tar.gz/utils/mpv-nordlicht.lua -> _service:download_files:v0.3.4.tar.gz/utils/mpv-nordlicht.lua
Changed
@@ -5,7 +5,7 @@ is_on = false -- size of the barcode: width = mp.get_property("osd-width") - height = math.floor(width/10) + height = math.floor(width/20) -- size of the progress marker: mw = math.floor(height/8)*2+1 mh = (mw+1)/2
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.