Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Linear memory extents over SSIZE_MAX are undefined, so there is no | ||
point in protecting against them. | ||
diff -ru zvbi.orig/src/export.c zvbi/src/export.c | ||
--- zvbi.orig/src/export.c 2011-11-06 11:22:47.000000000 +0200 | ||
+++ zvbi/src/export.c 2011-11-06 11:27:39.000000000 +0200 | ||
@@ -1076,8 +1076,6 @@ | ||
size_t count; | ||
|
||
count = src_size; | ||
- if (unlikely (src_size > SSIZE_MAX)) | ||
- count = SSIZE_MAX & -4096; | ||
|
||
for (retry = 10;; --retry) { | ||
actual = write (e->_handle.fd, src, count); | ||
@@ -1632,12 +1630,7 @@ | ||
free (e->buffer.data); | ||
} | ||
|
||
- if (unlikely (e->buffer.offset > (size_t) SSIZE_MAX)) { | ||
- errno = EOVERFLOW; | ||
- actual = -1; /* failed */ | ||
- } else { | ||
- actual = e->buffer.offset; | ||
- } | ||
+ actual = e->buffer.offset; | ||
} else { | ||
if (VBI_EXPORT_TARGET_ALLOC == e->target) | ||
free (e->buffer.data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff -ru zvbi.orig/contrib/ntsc-cc.c zvbi/contrib/ntsc-cc.c | ||
--- zvbi.orig/contrib/ntsc-cc.c 2011-11-06 11:22:47.000000000 +0200 | ||
+++ zvbi/contrib/ntsc-cc.c 2011-11-06 11:29:04.000000000 +0200 | ||
@@ -32,7 +32,6 @@ | ||
#include <fcntl.h> | ||
#include <errno.h> | ||
#include <locale.h> | ||
-#include <sys/ioctl.h> | ||
#include <sys/types.h> | ||
#include <sys/time.h> | ||
#ifdef HAVE_GETOPT_LONG | ||
@@ -44,6 +43,7 @@ | ||
#include "src/libzvbi.h" | ||
|
||
#ifdef ENABLE_V4L2 | ||
+# include <sys/ioctl.h> | ||
# include <asm/types.h> | ||
# include "src/videodev2k.h" | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff -ru zvbi/src/misc.h zvbi-fixed/src/misc.h | ||
--- zvbi/src/misc.h 2013-07-02 04:32:31.000000000 +0200 | ||
+++ zvbi-fixed/src/misc.h 2013-08-08 21:37:22.000000000 +0200 | ||
@@ -52,17 +52,6 @@ | ||
# define unlikely(expr) __builtin_expect(expr, 0) | ||
#endif | ||
|
||
-#undef __i386__ | ||
-#undef __i686__ | ||
-/* FIXME #cpu is deprecated | ||
-#if #cpu (i386) | ||
-# define __i386__ 1 | ||
-#endif | ||
-#if #cpu (i686) | ||
-# define __i686__ 1 | ||
-#endif | ||
-*/ | ||
- | ||
/* &x == PARENT (&x.tm_min, struct tm, tm_min), | ||
safer than &x == (struct tm *) &x.tm_min. A NULL _ptr is safe and | ||
will return NULL, not -offsetof(_member). */ | ||
@@ -156,8 +145,6 @@ | ||
|
||
#define likely(expr) (expr) | ||
#define unlikely(expr) (expr) | ||
-#undef __i386__ | ||
-#undef __i686__ | ||
|
||
static char * | ||
PARENT_HELPER (char *p, unsigned int offset) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
include ../../Makefile.include | ||
DEPS= ../../Makefile.include Makefile | ||
|
||
# lib name, version | ||
PACKAGENAME=zvbi | ||
LIBNAME=lib$(PACKAGENAME) | ||
VERSION=0.2.35 | ||
SOURCE=$(PACKAGENAME)-$(VERSION) | ||
ARCHIVE=$(SOURCE).tar.bz2 | ||
|
||
# configuration settings | ||
CONFIGURE=./configure --prefix=$(PREFIX) --without-x --disable-dvb --disable-bktr \ | ||
--disable-nls --disable-proxy \ | ||
--without-doxygen | ||
|
||
LIBDYLIB=$(PLATFORM)/src/.libs/$(LIBNAME).a | ||
|
||
CLEAN_FILES=$(ARCHIVE) $(PLATFORM) | ||
|
||
all: $(LIBDYLIB) .installed-$(PLATFORM) | ||
|
||
$(TARBALLS_LOCATION)/$(ARCHIVE): | ||
cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) | ||
|
||
$(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) | ||
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) | ||
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) | ||
cd $(PLATFORM); patch -p1 < ../01-zvbi-ssize_max.patch | ||
cd $(PLATFORM); patch -p1 < ../02-zvbi-ioctl.patch | ||
ifeq ($(OS),osx) | ||
cd $(PLATFORM); patch -p1 < ../03-zvbi-fix-clang-support.patch | ||
endif | ||
cd $(PLATFORM); autoreconf -vif | ||
cd $(PLATFORM); $(CONFIGURE) | ||
|
||
$(LIBDYLIB): $(PLATFORM) | ||
$(MAKE) -C $(PLATFORM) | ||
|
||
.installed-$(PLATFORM): $(LIBDYLIB) | ||
ifeq ($(OS),android) | ||
rm -f $(PLATFORM)/src/.libs/libzvbi.la $(PLATFORM)/src/.libs/libzvbi.so $(PLATFORM)/src/.libs/libzvbi.so.0 | ||
mv -f $(PLATFORM)/src/.libs/libzvbi.so.0.0.0 $(PLATFORM)/src/.libs/libzvbi.so | ||
$(RPL) -e "libzvbi.so.0" "libzvbi.so\x00\x00" $(PLATFORM)/src/.libs/libzvbi.so | ||
-$(READELF) --dynamic $(PLATFORM)/src/.libs/libzvbi.so | grep ibrary | ||
endif | ||
$(MAKE) -C $(PLATFORM) install | ||
touch $@ | ||
clean: | ||
$(MAKE) -C $(PLATFORM) clean | ||
rm -r .installed-$(PLATFORM) | ||
|
||
distclean:: | ||
rm -rf $(PLATFORM) .installed-$(PLATFORM) |
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FernetMenta - here is the complete win32 patch to get it to compile in mingw:
http://pastebin.com/AxuXZUPb
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, thanks!
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh now that i look at it - the first patch for conv.c could also fix android - will try at home ...
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wsnipex ENABLE_BKTR should be undefined on android
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean without --disable-bktr? not yet. Is that in any way related to the incomplete pthread implementation on android?
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do you configure it?
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just used this Makefile
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that configure line is borrowed from vlc btw :)
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wsnipex @FernetMenta fyi - i finally uploaded the zvbi tarball to our mirrors ;)
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks much! Next I will try to write some code and figure out how this lib works.
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So its not like just enabling it in ffmpeg i guess?
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I need to write a new overlay decoder for this. Also touch demuxer to get the cc data. i was talking about a challange :)
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so what @notspiff wrote was a bit to optimistic? ^^
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libzvbi_dec.c
Demuxer work is definitely necessary but wouldnt overlay be ass or ffmpeg ?
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overlay would be a combination of those. first ffmpeg converts to ass and second stage we need to handle ass the way we do already. but this 2 fold codec has to be written.
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, suspected as much but i thought it [c|w]ould be done as a bsf in the demuxer layer. i don't know all the details of how ass is handled in dvdplayer though so i guess if an overlay-in-overlay makes more sense to you that is the better solution.
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about the approach of doing the conversion in the demuxer layer but thought it won't be nice having a decoder in that stage. Anyhow, things may chnage, first I need.to get something working to play with
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, this turns out to be more work than I thought. neither ffmpeg nor zvbi is any help here. zvbi is only capable of cea 608 (line 21, outdated) and ffmpeg can only extract 608 at wrong stage. I need to write a separate demuxer and 708 decoder.
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not worth the hazzle if you ask me then - if ffmpeg can't do it its just a pity for those users - so be it...
eb4b65b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem is that I already got started and I hate things not working :)