diff options
author | Claudio Ciccani <klan@users.sourceforge.net> | 2007-01-03 15:09:42 +0000 |
---|---|---|
committer | Claudio Ciccani <klan@users.sourceforge.net> | 2007-01-03 15:09:42 +0000 |
commit | 35374893f50c163e0cae77dc4801c0d1b7af4d08 (patch) | |
tree | 31b67990eeb94596d8c34a7f067994730553b381 /src/input/input_mms.c | |
parent | f520a8933ac659d52b66049b2bb2402a9d50c48b (diff) | |
download | xine-lib-35374893f50c163e0cae77dc4801c0d1b7af4d08.tar.gz xine-lib-35374893f50c163e0cae77dc4801c0d1b7af4d08.tar.bz2 |
Added support for setting the playback start time (same as the RTSP plugin).
Actually this is only implemented for the MMST protocol.
CVS patchset: 8484
CVS date: 2007/01/03 15:09:42
Diffstat (limited to 'src/input/input_mms.c')
-rw-r--r-- | src/input/input_mms.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/input/input_mms.c b/src/input/input_mms.c index d4f6cb940..6ef256ea3 100644 --- a/src/input/input_mms.c +++ b/src/input/input_mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_mms.c,v 1.64 2006/10/23 21:18:18 hadess Exp $ + * $Id: input_mms.c,v 1.65 2007/01/03 15:09:42 klan Exp $ * * mms input plugin based on work from major mms */ @@ -201,6 +201,26 @@ static off_t mms_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin return curpos; } +static off_t mms_plugin_seek_time (input_plugin_t *this_gen, int time_offset, int origin) { + mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; + off_t curpos = 0; + + lprintf ("seek_time %d msec, origin %d\n", time_offset, origin); + + switch (this->protocol) { + case PROTOCOL_MMST: + if (origin == SEEK_SET) + mms_set_start_time (this->mms, time_offset); + curpos = mms_get_current_pos (this->mms); + break; + case PROTOCOL_MMSH: + curpos = mmsh_get_current_pos (this->mmsh); + break; + } + + return curpos; +} + static off_t mms_plugin_get_length (input_plugin_t *this_gen) { mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; off_t length = 0; @@ -356,6 +376,10 @@ static int mms_plugin_open (input_plugin_t *this_gen) { this->mms = mms; this->mmsh = mmsh; + if (this->protocol == PROTOCOL_MMST) { + this->input_plugin.seek_time = mms_plugin_seek_time; + } + return 1; } |