Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright (c) 2008 Wayne Meissner
  * Copyright (C) 1999,2000 Erik Walthinsen <>
  *                    2000 Wim Taymans <>
  *                    2005 Wim Taymans <>
  * This file is part of gstreamer-java.
  * This code is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License version 3 only, as
 * published by the Free Software Foundation.
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * version 3 for more details.
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with this work.  If not, see <>.
package org.gstreamer.event;
Notification of new latency adjustment.

The event is sent upstream from the sinks and notifies elements that they should add an additional latency to the timestamps before synchronising against the clock.

The latency is mostly used in live sinks and is always expressed in the time format.

public class LatencyEvent extends Event {
    private static interface API extends com.sun.jna.Library {
        Pointer ptr_gst_event_new_latency(ClockTime latency);
        void gst_event_parse_latency(Event eventClockTime[] latency);
    private static final API gst = GstNative.load(API.class);
This constructor is for internal use only.

init initialization data.
    public LatencyEvent(Initializer init) {
Create a new latency event.

latency the new latency value to add to timestamps.
    public LatencyEvent(ClockTime latency) {
Gets the latency in the latency event.

the latency.
    public ClockTime getLatency() {
        ClockTime[] latency = new ClockTime[1];
        return latency[0];
New to GrepCode? Check out our FAQ X