File tree 5 files changed +33
-13
lines changed
5 files changed +33
-13
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ set(MANDIR "share/man/man1" CACHE FILEPATH "mandir")
11
11
12
12
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /bin)
13
13
14
+ option (MOVIES "Compile support for movie playback (requires gdk-x11)" ON )
15
+
14
16
add_subdirectory (src)
15
17
add_subdirectory (icons)
16
18
add_subdirectory (man)
Original file line number Diff line number Diff line change @@ -5,11 +5,20 @@ pkg_check_modules(GEE REQUIRED gee-0.8)
5
5
pkg_check_modules(POPPLER REQUIRED poppler-glib)
6
6
pkg_check_modules(GTK REQUIRED gtk+-3.0)
7
7
pkg_check_modules(GTHREAD REQUIRED gthread-2.0)
8
- pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
9
- pkg_check_modules(GSTBASE REQUIRED gstreamer-base-1.0)
10
- pkg_check_modules(GSTAUDIO REQUIRED gstreamer-audio-1.0)
11
- pkg_check_modules(GSTVIDEO REQUIRED gstreamer-video-1.0)
12
- pkg_check_modules(GDKX11 REQUIRED gdk-x11-3.0)
8
+ if (MOVIES)
9
+ pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
10
+ pkg_check_modules(GSTBASE REQUIRED gstreamer-base-1.0)
11
+ pkg_check_modules(GSTAUDIO REQUIRED gstreamer-audio-1.0)
12
+ pkg_check_modules(GSTVIDEO REQUIRED gstreamer-video-1.0)
13
+ pkg_check_modules(GDKX11 REQUIRED gdk-x11-3.0)
14
+ set (MOVIE_PACKAGES
15
+ gstreamer-1.0
16
+ gstreamer-base-1.0
17
+ gstreamer-audio-1.0
18
+ gstreamer-video-1.0
19
+ gdk-x11-3.0
20
+ )
21
+ endif ()
13
22
14
23
set (CFLAGS
15
24
${GOBJECT_CFLAGS} ${GOBJECT_CFLAGS_OTHER}
@@ -56,6 +65,11 @@ link_directories(${LIB_PATHS})
56
65
CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR} /paths .in ${CMAKE_CURRENT_SOURCE_DIR} /paths .vala)
57
66
58
67
file (GLOB_RECURSE VALA_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.vala)
68
+ if (MOVIES)
69
+ set (EXTRA_VALA_OPTIONS ${EXTRA_VALA_OPTIONS} -D MOVIES)
70
+ else ()
71
+ LIST (REMOVE_ITEM VALA_SRC classes/action/movie.vala)
72
+ endif ()
59
73
60
74
vala_precompile(VALA_C
61
75
${VALA_SRC}
@@ -65,15 +79,12 @@ PACKAGES
65
79
poppler-glib
66
80
gtk+-3.0
67
81
posix
68
- gstreamer-1.0
69
- gstreamer-base-1.0
70
- gstreamer-audio-1.0
71
- gstreamer-video-1.0
72
- gdk-x11-3.0
82
+ ${MOVIE_PACKAGES}
73
83
OPTIONS
74
84
--thread
75
85
--debug
76
86
--enable-experimental
87
+ ${EXTRA_VALA_OPTIONS}
77
88
GENERATE_HEADER
78
89
presenter
79
90
GENERATE_VAPI
Original file line number Diff line number Diff line change @@ -584,7 +584,12 @@ namespace pdfpc.Metadata {
584
584
*/
585
585
private int mapping_page_num = - 1 ;
586
586
private GLib . List<ActionMapping > action_mapping;
587
- private ActionMapping [] blanks = {new ControlledMovie (), new LinkAction ()};
587
+ private ActionMapping [] blanks = {
588
+ #if MOVIES
589
+ new ControlledMovie (),
590
+ #endif
591
+ new LinkAction ()
592
+ };
588
593
public weak PresentationController controller = null ;
589
594
590
595
/**
Original file line number Diff line number Diff line change @@ -906,6 +906,7 @@ namespace pdfpc {
906
906
return tm. mktime();
907
907
}
908
908
909
+ #if MOVIES
909
910
/**
910
911
* Give the Gdk.Rectangle corresponding to the Poppler.Rectangle for the nth
911
912
* controllable's main view. Also, return the XID for the view's window,
@@ -925,5 +926,6 @@ namespace pdfpc {
925
926
rect = view. convert_poppler_rectangle_to_gdk_rectangle(area);
926
927
return (uint * ) ((Gdk . X11. Window ) view. get_window()). get_xid();
927
928
}
929
+ #endif
928
930
}
929
931
}
Original file line number Diff line number Diff line change @@ -195,9 +195,9 @@ namespace pdfpc {
195
195
print_version();
196
196
Posix . exit(0 );
197
197
}
198
-
198
+ # if MOVIES
199
199
Gst . init( ref args );
200
-
200
+ #endif
201
201
if (Options . list_actions) {
202
202
stdout. printf(" Config file commands accepted by pdfpc:\n " );
203
203
string [] actions = PresentationController . getActionDescriptions();
You can’t perform that action at this time.
0 commit comments