summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/Makefile.am8
-rw-r--r--pixmaps/Makefile.am22
-rw-r--r--src/Makefile.am14
-rw-r--r--src/decoder.cc4
-rw-r--r--src/dvfile.cc14
-rw-r--r--src/dvfile.h4
-rw-r--r--src/miav.qrc23
7 files changed, 49 insertions, 40 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index f617b68..dfa6a5b 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,7 +1,9 @@
# Man pages
-man_MANS = \
- miav.1 \
- miav.conf.1
+
+# TODO: Re-enable when updated...
+#man_MANS = \
+# miav.1 \
+# miav.conf.1
EXTRA_DIST = \
miav.1 \
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
index eaadad6..01b7c42 100644
--- a/pixmaps/Makefile.am
+++ b/pixmaps/Makefile.am
@@ -17,25 +17,3 @@ EXTRA_DIST = \
backspace.png \
unmute.png \
mute.png
-
-pixmapdir = $(datadir)/pixmaps
-
-pixmap_DATA = \
- dummy.dv\
- about.png \
- clear.png \
- cpr.png \
- dummy.png \
- freeze.png \
- miav-logo.png \
- record.png \
- snapshot.png \
- stop.png \
- unfreeze.png \
- warning.png \
- info.png \
- error.png \
- question.png \
- backspace.png \
- unmute.png \
- mute.png
diff --git a/src/Makefile.am b/src/Makefile.am
index ac0545c..91ca228 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -12,11 +12,11 @@ endif
AM_CXXFLAGS = $(QT_CFLAGS)
miav_CXXFLAGS = $(SDL_CFLAGS) $(DV_CFLAGS) $(IEC61883_CFLAGS) $(QT_CFLAGS) \
- -I../include -DPIXMAPS=\"$(datadir)/pixmaps\" \
- -DETC=\"$(prefix)/etc/miav\" -I$(top_srcdir)/hugin
+ -I../include -DETC=\"$(prefix)/etc/miav\" -I$(top_srcdir)/hugin \
+ -DPIXMAPS=\":/pixmaps\"
miav_LDADD = $(shell ../tools/MocList o) $(QT_LIBS) $(IEC61883_LIBS) \
- $(SDL_LIBS) $(DV_LIBS)
+ $(SDL_LIBS) $(DV_LIBS) qrc_miav.o
miav_SOURCES = \
aa_socket.cc \
@@ -141,14 +141,18 @@ EXTRA_DIST = \
threadsafe_queue_priority.h \
util.h \
videowidget.h \
- yuv_draw.h
+ yuv_draw.h \
+ miav.qrc
miav_MOC = $(shell if [ $QT_CXXFLAGS ] ; then ../tools/MocList cc; fi )
-BUILT_SOURCES = $(miav_MOC)
+BUILT_SOURCES = $(miav_MOC) qrc_miav.cc
CLEANFILES = $(BUILT_SOURCES)
+qrc_%.cc: %.qrc
+ rcc $< > $@
+
%.moc.cc: %.h
$(QT_MOC) -o $@ $<
diff --git a/src/decoder.cc b/src/decoder.cc
index f32c18a..9e34a28 100644
--- a/src/decoder.cc
+++ b/src/decoder.cc
@@ -92,8 +92,8 @@ void Decoder::decode()
bool skip_frames = config->readInt("player_skip_frames");
- dv1394 dv1394_stream = dv1394(info); // Use default port and channel.
- dvfile dvfile_stream = dvfile(info);
+ dv1394 dv1394_stream(info); // Use default port and channel.
+ dvfile dvfile_stream(info);
if(dv1394_stream.connect()) {
// Use the dv1394 stream for input.
dvstream = &dv1394_stream;
diff --git a/src/dvfile.cc b/src/dvfile.cc
index b942e42..b7c7f47 100644
--- a/src/dvfile.cc
+++ b/src/dvfile.cc
@@ -32,15 +32,17 @@
#include "util.h"
dvfile::dvfile(Info* i)
+ : fp(QString(TEST_MOVIE))
{
info = i;
- fp = fopen(TEST_MOVIE, "r");
- if(!fp) info->error("Couldn't open %s for reading.", TEST_MOVIE);
+ if(!fp.open(QIODevice::ReadOnly)) {
+ info->error("Couldn't open %s for reading.", TEST_MOVIE);
+ }
}
dvfile::~dvfile()
{
- fclose(fp);
+ fp.close();
}
unsigned char *dvfile::readFrame()
@@ -49,9 +51,9 @@ unsigned char *dvfile::readFrame()
sleep_1_frame();
- if(fp) {
- while(fread(frame, DVPACKAGE_SIZE, 1, fp) == 0) {
- fseek(fp, 0L, SEEK_SET);
+ if(fp.isReadable()) {
+ while(fp.read((char *)frame, DVPACKAGE_SIZE) == 0) {
+ fp.seek(0);
}
} else {
memset(frame, 0, sizeof(frame));
diff --git a/src/dvfile.h b/src/dvfile.h
index 1052c55..b78ec68 100644
--- a/src/dvfile.h
+++ b/src/dvfile.h
@@ -29,7 +29,7 @@
#include "frame_stream.h"
-#include <stdio.h>
+#include <QFile>
#include "info.h"
@@ -44,7 +44,7 @@ public:
private:
Info* info;
- FILE* fp;
+ QFile fp;
};
#endif/*__MIAV_DVFILE_H__*/
diff --git a/src/miav.qrc b/src/miav.qrc
new file mode 100644
index 0000000..76d4442
--- /dev/null
+++ b/src/miav.qrc
@@ -0,0 +1,23 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+<qresource>
+ <file alias="pixmaps/mute.png">../pixmaps/mute.png</file>
+ <file alias="pixmaps/unmute.png">../pixmaps/unmute.png</file>
+ <file alias="pixmaps/record.png">../pixmaps/record.png</file>
+ <file alias="pixmaps/stop.png">../pixmaps/stop.png</file>
+ <file alias="pixmaps/freeze.png">../pixmaps/freeze.png</file>
+ <file alias="pixmaps/unfreeze.png">../pixmaps/unfreeze.png</file>
+ <file alias="pixmaps/cpr.png">../pixmaps/cpr.png</file>
+ <file alias="pixmaps/clear.png">../pixmaps/clear.png</file>
+ <file alias="pixmaps/snapshot.png">../pixmaps/snapshot.png</file>
+ <file alias="pixmaps/dummy.png">../pixmaps/dummy.png</file>
+ <file alias="pixmaps/miav-logo.png">../pixmaps/miav-logo.png</file>
+
+ <file alias="pixmaps/dummy.dv">../pixmaps/dummy.dv</file>
+
+ <file alias="pixmaps/info.png">../pixmaps/info.png</file>
+ <file alias="pixmaps/warning.png">../pixmaps/warning.png</file>
+ <file alias="pixmaps/question.png">../pixmaps/question.png</file>
+ <file alias="pixmaps/error.png">../pixmaps/error.png</file>
+</qresource>
+</RCC>