summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 03:17:41 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 07:48:31 +0200
commit3cb3bbbddc1d09dab1471a3630f1a9aa4392ed50 (patch)
tree4989a29dbae266e0bb83bddca9fcdef1058c4a17 /stream/stream.h
parent2be10f22b24712b959fa2883a4dcfa7caf72ab79 (diff)
downloadmpv-3cb3bbbddc1d09dab1471a3630f1a9aa4392ed50.tar.bz2
mpv-3cb3bbbddc1d09dab1471a3630f1a9aa4392ed50.tar.xz
Add a simple capture feature (-capture)
If a specified key is pressed during playback, the current stream is captured to a file, similar to what -dumpstream achieves. original patch by Pásztor Szilárd, don tricon hu Taken from the following svn commits, but with several fixes and modifications (one obvious user-visible difference is that the default key binding is 'C', not 'c'): git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32524 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32529 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32530 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream.h')
-rw-r--r--stream/stream.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/stream/stream.h b/stream/stream.h
index bd73f6f954..8e4b260ffb 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -22,6 +22,7 @@
#include "config.h"
#include "mp_msg.h"
#include "url.h"
+#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <sys/types.h>
@@ -168,6 +169,7 @@ typedef struct stream {
streaming_ctrl_t *streaming_ctrl;
#endif
unsigned char buffer[STREAM_BUFFER_SIZE>STREAM_MAX_SECTOR_SIZE?STREAM_BUFFER_SIZE:STREAM_MAX_SECTOR_SIZE];
+ FILE *capture_file;
} stream_t;
#ifdef CONFIG_NETWORKING
@@ -176,6 +178,7 @@ typedef struct stream {
int stream_fill_buffer(stream_t *s);
int stream_seek_long(stream_t *s, off_t pos);
+void stream_capture_do(stream_t *s);
#ifdef CONFIG_STREAM_CACHE
int stream_enable_cache(stream_t *stream,int size,int min,int prefill);