diff options
author | phintuka <phintuka> | 2010-02-14 13:40:23 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-02-14 13:40:23 +0000 |
commit | afd39385ab2ffbe757d93bab49411611f17c5814 (patch) | |
tree | 40f700b02491ee76a2ef2e9cfc18d6918f1d04c0 | |
parent | 56b10fbbe13a6eb219f41da6d8a78a37d15bd378 (diff) | |
download | xineliboutput-afd39385ab2ffbe757d93bab49411611f17c5814.tar.gz xineliboutput-afd39385ab2ffbe757d93bab49411611f17c5814.tar.bz2 |
Assed still mode
-rw-r--r-- | xine/xvdr_metronom.c | 13 | ||||
-rw-r--r-- | xine/xvdr_metronom.h | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/xine/xvdr_metronom.c b/xine/xvdr_metronom.c index 441170a7..f219927c 100644 --- a/xine/xvdr_metronom.c +++ b/xine/xvdr_metronom.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xvdr_metronom.c,v 1.4 2010-01-30 19:26:15 phintuka Exp $ + * $Id: xvdr_metronom.c,v 1.5 2010-02-14 13:40:23 phintuka Exp $ * */ @@ -31,6 +31,11 @@ static void got_video_frame(metronom_t *metronom, vo_frame_t *frame) if (this->frame_decoded) this->frame_decoded(this->handle, this->video_frames, this->audio_frames); + if (this->still_mode) { + LOGMSG("Still frame, type %d", frame->picture_coding_type); + frame->pts = 0; + } + if (this->trickspeed) { frame->pts = 0; frame->duration *= 12; /* GOP */ @@ -155,6 +160,11 @@ static void xvdr_metronom_set_trickspeed(xvdr_metronom_t *this, int trickspeed) this->trickspeed = trickspeed; } +static void xvdr_metronom_set_still_mode(xvdr_metronom_t *this, int still_mode) +{ + this->still_mode = still_mode; +} + /* * init */ @@ -169,6 +179,7 @@ xvdr_metronom_t *xvdr_metronom_init(xine_stream_t *stream) this->set_cb = xvdr_metronom_set_cb; this->reset_frames = xvdr_metronom_reset_frames; this->set_trickspeed = xvdr_metronom_set_trickspeed; + this->set_still_mode = xvdr_metronom_set_still_mode; this->dispose = xvdr_metronom_dispose; this->metronom.set_audio_rate = set_audio_rate; diff --git a/xine/xvdr_metronom.h b/xine/xvdr_metronom.h index b73f8580..a2f6b4e9 100644 --- a/xine/xvdr_metronom.h +++ b/xine/xvdr_metronom.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xvdr_metronom.h,v 1.3 2010-01-30 19:26:16 phintuka Exp $ + * $Id: xvdr_metronom.h,v 1.4 2010-02-14 13:40:23 phintuka Exp $ * */ @@ -29,6 +29,7 @@ struct xvdr_metronom_s { void (*dispose) (xvdr_metronom_t *); void (*set_trickspeed)(xvdr_metronom_t *, int); + void (*set_still_mode)(xvdr_metronom_t *, int); /* accumulated frame data */ volatile uint video_frames; @@ -47,6 +48,7 @@ struct xvdr_metronom_s { void (*frame_decoded)(void *handle, uint video_count, uint audio_count); int trickspeed; /* current trick speed */ + int still_mode; int64_t last_vo_pts; /* last displayed video frame PTS */ #endif }; |