blob: 7da13bad9a0ec3cef63b3a6d7c17ed1a17889839 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.neomedia.control;
import java.util.*;
/**
* Represents a control over the key frame-related logic of a
* <tt>VideoMediaStream</tt>.
*
* @author Lyubomir Marinov
*/
public interface KeyFrameControl
{
/**
* Adds a <tt>KeyFrameRequester</tt> to be made available through this
* <tt>KeyFrameControl</tt>.
*
* @param index the zero-based index at which <tt>keyFrameRequester</tt> is
* to be added to the list of <tt>KeyFrameRequester</tt>s made available or
* <tt>-1</tt> to have this <tt>KeyFrameControl</tt> choose at which index
* it is to be added in accord with its internal logic
* through this <tt>KeyFrameControl</tt>
* @param keyFrameRequester the <tt>KeyFrameRequester</tt> to be added to
* this <tt>KeyFrameControl</tt> so that it is made available through it
*/
public void addKeyFrameRequester(
int index,
KeyFrameRequester keyFrameRequester);
/**
* Gets the <tt>KeyFrameRequester</tt>s made available through this
* <tt>KeyFrameControl</tt>.
*
* @return an unmodifiable list of <tt>KeyFrameRequester</tt>s made
* available through this <tt>KeyFrameControl</tt>
*/
public List<KeyFrameRequester> getKeyFrameRequesters();
/**
* Removes a <tt>KeyFrameRequester</tt> to no longer be made available
* through this <tt>KeyFrameControl</tt>.
*
* @param keyFrameRequester the <tt>KeyFrameRequester</tt> to be removed
* from this <tt>KeyFrameControl</tt> so that it is no longer made available
* through it
* @return <tt>true</tt> if <tt>keyFrameRequester</tt> was found in this
* <tt>KeyFrameControl</tt>; otherwise, <tt>false</tt>
*/
public boolean removeKeyFrameRequester(KeyFrameRequester keyFrameRequester);
/**
* Represents a way for a <tt>VideoMediaStream</tt> to request a key frame
* from its remote peer.
*
* @author Lyubomir Marinov
*/
public interface KeyFrameRequester
{
/**
* The name of the <tt>ConfigurationService</tt> property which
* specifies the preferred <tt>KeyFrameRequester</tt> to be used.
*/
public static final String PREFERRED_PNAME
= "net.java.sip.communicator.service.media.codec.video.h264."
+ "preferredKeyFrameRequester";
/**
* The value of the {@link #PREFERRED_PNAME}
* <tt>ConfigurationService</tt> property which indicates that the
* RTCP <tt>KeyFrameRequester</tt> is preferred.
*/
public static final String RTCP = "rtcp";
/**
* The value of the {@link #PREFERRED_PNAME}
* <tt>ConfigurationService</tt> property which indicates that the
* signaling/protocol <tt>KeyFrameRequester</tt> is preferred.
*/
public static final String SIGNALING = "signaling";
/**
* The default value of the {@link #PREFERRED_PNAME}
* <tt>ConfigurationService</tt> property.
*/
public static final String DEFAULT_PREFERRED = RTCP;
/**
* Requests a key frame from the remote peer of the associated
* <tt>VideoMediaStream</tt>.
*
* @return <tt>true</tt> if this <tt>KeyFrameRequester</tt> has
* indeed requested a key frame from the remote peer of the associated
* <tt>VideoMediaStream</tt> in response to the call; otherwise,
* <tt>false</tt>
*/
public boolean requestKeyFrame();
}
}
|