summaryrefslogtreecommitdiff
path: root/softhddev.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-03-07 15:31:43 +0100
committerJohns <johns98@gmx.net>2012-03-07 15:31:43 +0100
commitacc35fe30c6b48d771cc75c6168c51490d24953f (patch)
tree0f5eb0fe17290daabfc535d119d0237cd5b74482 /softhddev.c
parentee5804fed7237e382a75c42a9f926ec38bb96e18 (diff)
downloadvdr-plugin-softhddevice-acc35fe30c6b48d771cc75c6168c51490d24953f.tar.gz
vdr-plugin-softhddevice-acc35fe30c6b48d771cc75c6168c51490d24953f.tar.bz2
Video cleanup.
Add noop video output module. Move VideoThread check into lock/unlock functions. Add support for choosing video output module.
Diffstat (limited to 'softhddev.c')
-rw-r--r--softhddev.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/softhddev.c b/softhddev.c
index 6de211c..ff44b8c 100644
--- a/softhddev.c
+++ b/softhddev.c
@@ -2079,6 +2079,7 @@ const char *CommandLineHelp(void)
" -d display\tdisplay of x11 server (fe. :0.0)\n"
" -f\t\tstart with fullscreen window (only with window manager)\n"
" -g geometry\tx11 window geometry wxh+x+y\n"
+ " -v device\tvideo device (va-api, vdpau, noop)\n"
" -s\t\tstart in suspended mode\n" " -x\t\tstart x11 server\n"
" -w workaround\tenable/disable workarounds\n"
"\tno-hw-decoder\t\tdisable hw decoder, use software decoder only\n"
@@ -2099,7 +2100,7 @@ int ProcessArgs(int argc, char *const argv[])
// Parse arguments.
//
for (;;) {
- switch (getopt(argc, argv, "-a:c:d:fg:p:sw:x")) {
+ switch (getopt(argc, argv, "-a:c:d:fg:p:sv:w:x")) {
case 'a': // audio device for pcm
AudioSetDevice(optarg);
continue;
@@ -2123,6 +2124,13 @@ int ProcessArgs(int argc, char *const argv[])
return 0;
}
continue;
+ case 'v': // video driver
+ VideoSetDevice(optarg);
+#ifdef USE_VDPAU
+ // FIXME: this is a big hack
+ ConfigVdpauDecoder = !strcasecmp(optarg, "vdpau");
+#endif
+ continue;
case 'x': // x11 server
ConfigStartX11Server = 1;
continue;
@@ -2392,30 +2400,26 @@ void Suspend(int video, int audio, int dox11)
SkipVideo = 1;
SkipAudio = 1;
- pthread_mutex_unlock(&SuspendLockMutex);
- if (audio || video) {
- pthread_mutex_lock(&SuspendLockMutex);
-
- if (audio) {
- AudioExit();
- if (MyAudioDecoder) {
- CodecAudioClose(MyAudioDecoder);
- CodecAudioDelDecoder(MyAudioDecoder);
- MyAudioDecoder = NULL;
- }
- NewAudioStream = 0;
- av_free_packet(AudioAvPkt);
- }
- if (video) {
- StopVideo();
+ if (audio) {
+ AudioExit();
+ if (MyAudioDecoder) {
+ CodecAudioClose(MyAudioDecoder);
+ CodecAudioDelDecoder(MyAudioDecoder);
+ MyAudioDecoder = NULL;
}
-
- pthread_mutex_unlock(&SuspendLockMutex);
+ NewAudioStream = 0;
+ av_free_packet(AudioAvPkt);
}
+ if (video) {
+ StopVideo();
+ }
+
if (dox11) {
// FIXME: stop x11, if started
}
+
+ pthread_mutex_unlock(&SuspendLockMutex);
}
/**