public static Int16 FromSeekFlags(SeekFlags value) { Int16 rval; if (FromSeekFlags(value, out rval) == -1) { ThrowArgumentException(value); } return(rval); }
public override void Seek(uint position, bool accurate_seek) { SeekFlags seek_flags = SeekFlags.Flush; if (accurate_seek) { seek_flags |= SeekFlags.Accurate; } playbin.SeekSimple(Format.Time, seek_flags, (((long)position) * Gst.Constants.MSECOND)); OnEventChanged(PlayerEvent.Seek); }
public override void Seek(uint position, bool accurate_seek = false) { SeekFlags seek_flags = SeekFlags.Flush; if (accurate_seek) { seek_flags |= SeekFlags.Accurate; } playbin.Seek(Format.Time, seek_flags, (long)(position * Gst.Clock.MSecond)); OnEventChanged(PlayerEvent.Seek); }
bool Seek(SeekFlags flags, SeekType start_type, long start, SeekType stop_type, long stop) { var format = Format.Time; // Seeks without the GST_SEEK_FLAG_FLUSH should only be done when the pipeline is in the PLAYING state. // Executing a non-flushing seek in the PAUSED state might deadlock because the pipeline streaming threads might be blocked in the sinks. if (playbin.CurrentState == State.Paused /* || FEos || FSeeking*/) { flags |= SeekFlags.Flush; } return(FSeeking = playbin.Seek(FRate, format, flags, start_type, start, stop_type, stop)); }
bool Seek(SeekFlags seekFlags, SeekType start_type, long start, SeekType stop_type, long stop) { // Seeks without the GST_SEEK_FLAG_FLUSH should only be done when the pipeline is in the PLAYING state. // Executing a non-flushing seek in the PAUSED state might deadlock because the pipeline streaming threads might be blocked in the sinks. if (FCurrentState != State.Playing) { seekFlags |= SeekFlags.Flush; } if (videosink.Seek(1d, Format.Time, seekFlags | SeekFlags.Accurate, start_type, start, stop_type, stop)) { FSeeking = seekFlags.HasFlag(SeekFlags.Flush); return(true); } return(false); }
public override long Seek(long offset, SeekOrigin origin) { this.AssertNotDisposed(); if (!this.CanSeek) { throw new NotSupportedException("The File Stream does not support seeking"); } SeekFlags seekFlag = SeekFlags.SEEK_CUR; switch (origin) { case SeekOrigin.Begin: { seekFlag = SeekFlags.SEEK_SET; break; } case SeekOrigin.Current: { seekFlag = SeekFlags.SEEK_CUR; break; } case SeekOrigin.End: { seekFlag = SeekFlags.SEEK_END; break; } default: { throw new ArgumentException("origin"); } } if (Stdlib.fseek(this.file, offset, seekFlag) != 0) { throw new IOException("Unable to seek", UnixMarshal.CreateExceptionForLastError()); } long num = Stdlib.ftell(this.file); if (num == (long)-1) { throw new IOException("Unable to get current file position", UnixMarshal.CreateExceptionForLastError()); } GC.KeepAlive(this); return(num); }
public override long Seek(long offset, SeekOrigin origin) { SeekFlags seekFlags = SeekFlags.SEEK_SET; if (origin == SeekOrigin.Current) { seekFlags = SeekFlags.SEEK_CUR; } else if (origin == SeekOrigin.End) { seekFlags = SeekFlags.SEEK_END; } long seeked = Syscall.lseek(fd, offset, seekFlags); // == offset) //if(seeked == offset) currentPos = offset; //else // throw new Exception("LinuxStream : unable to seek to position "+offset+" (got "+seeked+"): "+ Mono.Unix.Native.Stdlib.strerror (Mono.Unix.Native.Stdlib.GetLastError ())); return(seeked); }
public override long Seek(long offset, SeekOrigin origin) { this.AssertNotDisposed(); if (!this.CanSeek) { throw new NotSupportedException("The File Descriptor does not support seeking"); } SeekFlags seekFlag = SeekFlags.SEEK_CUR; switch (origin) { case SeekOrigin.Begin: { seekFlag = SeekFlags.SEEK_SET; break; } case SeekOrigin.Current: { seekFlag = SeekFlags.SEEK_CUR; break; } case SeekOrigin.End: { seekFlag = SeekFlags.SEEK_END; break; } } long num = Syscall.lseek(this.fileDescriptor, offset, seekFlag); if (num == (long)-1) { UnixMarshal.ThrowExceptionForLastError(); } return(num); }
public static bool TryFromSeekFlags (SeekFlags value, out Int16 rval) { return FromSeekFlags (value, out rval) == 0; }
private static extern int FromSeekFlags (SeekFlags value, out Int16 rval);
public static bool TryToSeekFlags(Int16 value, out SeekFlags rval) { return(ToSeekFlags(value, out rval) == 0); }
private static extern int ToSeekFlags(Int16 value, out SeekFlags rval);
public static int fseek(IntPtr stream, long offset, SeekFlags origin) { return(Stdlib.sys_fseek(stream, offset, NativeConvert.FromSeekFlags(origin))); }
public static bool TryToSeekFlags (Int16 value, out SeekFlags rval) { return ToSeekFlags (value, out rval) == 0; }
internal static extern int lseek(int fd, int offset, SeekFlags whence);
private static int FromSeekFlags(SeekFlags value, out Int16 rval) { throw new System.NotImplementedException(); }
private static int ToSeekFlags (Int16 value, out SeekFlags rval) { throw new System.NotImplementedException(); }
private static int FromSeekFlags (SeekFlags value, out Int16 rval) { throw new System.NotImplementedException(); }
public static int fseek (IntPtr stream, long offset, SeekFlags origin) { int _origin = UnixConvert.FromSeekFlags (origin); return sys_fseek (stream, offset, _origin); }
public static long lseek (int fd, long offset, SeekFlags whence) { short _whence = UnixConvert.FromSeekFlags (whence); return sys_lseek (fd, offset, _whence); }
public static Int16 FromSeekFlags (SeekFlags value) { Int16 rval; if (FromSeekFlags (value, out rval) == -1) ThrowArgumentException (value); return rval; }
private static extern int ToSeekFlags (Int16 value, out SeekFlags rval);
[DllImport("libsmbclient.so",SetLastError=true)] extern internal static int smbc_lseek(int fd, int offset, SeekFlags seek);
public static int fseek(IntPtr stream, long offset, SeekFlags origin) { int _origin = NativeConvert.FromSeekFlags(origin); return(sys_fseek(stream, offset, _origin)); }
public static bool TryFromSeekFlags(SeekFlags value, out Int16 rval) { return(FromSeekFlags(value, out rval) == 0); }
private static int ToSeekFlags(Int16 value, out SeekFlags rval) { throw new System.NotImplementedException(); }
[DllImport("libsmbclient.so", SetLastError = true)] extern internal static int smbc_lseek(int fd, int offset, SeekFlags seek);
public static extern int fseek(IntPtr stream, long offset, SeekFlags origin);
private static extern int FromSeekFlags(SeekFlags value, out Int16 rval);