Flatten packages within the RTSP package.

#minor-release

PiperOrigin-RevId: 371337762
This commit is contained in:
claincly 2021-04-30 16:29:10 +01:00 committed by bachinger
parent dfb87638e7
commit 4bf7477e3e
43 changed files with 121 additions and 212 deletions

View File

@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.sdp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.source.rtsp.message.RtspMessageUtil.parseInt; import static com.google.android.exoplayer2.source.rtsp.RtspMessageUtil.parseInt;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_FMTP; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_FMTP;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_RTPMAP; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_RTPMAP;
import static com.google.android.exoplayer2.util.Assertions.checkArgument; import static com.google.android.exoplayer2.util.Assertions.checkArgument;
import static com.google.android.exoplayer2.util.Assertions.checkState; import static com.google.android.exoplayer2.util.Assertions.checkState;
import static com.google.android.exoplayer2.util.Util.castNonNull; import static com.google.android.exoplayer2.util.Util.castNonNull;
@ -35,7 +35,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
/** Represents one media description section in a SDP message. */ /** Represents one media description section in a SDP message. */
public final class MediaDescription { /* package */ final class MediaDescription {
/** Represents the mandatory RTPMAP attribute in MediaDescription. Reference RFC 2327 Page 22. */ /** Represents the mandatory RTPMAP attribute in MediaDescription. Reference RFC 2327 Page 22. */
public static final class RtpMapAttribute { public static final class RtpMapAttribute {

View File

@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp;
import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DataSource;
/** An RTP {@link DataSource}. */ /** An RTP {@link DataSource}. */
public interface RtpDataChannel extends DataSource { /* package */ interface RtpDataChannel extends DataSource {
/** Creates {@link RtpDataChannel} for RTSP streams. */ /** Creates {@link RtpDataChannel} for RTSP streams. */
interface Factory { interface Factory {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2020 The Android Open Source Project * Copyright 2021 The Android Open Source Project
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import static com.google.android.exoplayer2.util.Util.closeQuietly; import static com.google.android.exoplayer2.util.Util.closeQuietly;
@ -27,7 +27,6 @@ import com.google.android.exoplayer2.extractor.DefaultExtractorInput;
import com.google.android.exoplayer2.extractor.ExtractorInput; import com.google.android.exoplayer2.extractor.ExtractorInput;
import com.google.android.exoplayer2.extractor.ExtractorOutput; import com.google.android.exoplayer2.extractor.ExtractorOutput;
import com.google.android.exoplayer2.extractor.PositionHolder; import com.google.android.exoplayer2.extractor.PositionHolder;
import com.google.android.exoplayer2.source.rtsp.RtspMediaTrack;
import com.google.android.exoplayer2.upstream.DataSpec; import com.google.android.exoplayer2.upstream.DataSpec;
import com.google.android.exoplayer2.upstream.Loader; import com.google.android.exoplayer2.upstream.Loader;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
@ -47,7 +46,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
* <p>Received RTP packets' payloads will be extracted by an {@link RtpExtractor}, and will be * <p>Received RTP packets' payloads will be extracted by an {@link RtpExtractor}, and will be
* written to the {@link ExtractorOutput} instance provided at construction. * written to the {@link ExtractorOutput} instance provided at construction.
*/ */
public final class RtpDataLoadable implements Loader.Loadable { /* package */ final class RtpDataLoadable implements Loader.Loadable {
/** Called on loadable events. */ /** Called on loadable events. */
public interface EventListener { public interface EventListener {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2020 The Android Open Source Project * Copyright 2021 The Android Open Source Project
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
@ -27,8 +27,8 @@ import com.google.android.exoplayer2.extractor.ExtractorInput;
import com.google.android.exoplayer2.extractor.ExtractorOutput; import com.google.android.exoplayer2.extractor.ExtractorOutput;
import com.google.android.exoplayer2.extractor.PositionHolder; import com.google.android.exoplayer2.extractor.PositionHolder;
import com.google.android.exoplayer2.extractor.SeekMap; import com.google.android.exoplayer2.extractor.SeekMap;
import com.google.android.exoplayer2.source.rtsp.rtp.reader.DefaultRtpPayloadReaderFactory; import com.google.android.exoplayer2.source.rtsp.reader.DefaultRtpPayloadReaderFactory;
import com.google.android.exoplayer2.source.rtsp.rtp.reader.RtpPayloadReader; import com.google.android.exoplayer2.source.rtsp.reader.RtpPayloadReader;
import com.google.android.exoplayer2.util.ParsableByteArray; import com.google.android.exoplayer2.util.ParsableByteArray;
import java.io.IOException; import java.io.IOException;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.util.Assertions.checkArgument; import static com.google.android.exoplayer2.util.Assertions.checkArgument;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2020 The Android Open Source Project * Copyright 2021 The Android Open Source Project
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp;
import static java.lang.Math.abs; import static java.lang.Math.abs;
import static java.lang.Math.max; import static java.lang.Math.max;

View File

@ -13,12 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription;
import com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription;
import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.MimeTypes;
import com.google.common.base.Ascii; import com.google.common.base.Ascii;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;

View File

@ -15,20 +15,20 @@
*/ */
package com.google.android.exoplayer2.source.rtsp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.source.rtsp.message.RtspMessageChannel.DEFAULT_RTSP_PORT; import static com.google.android.exoplayer2.source.rtsp.RtspMessageChannel.DEFAULT_RTSP_PORT;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_ANNOUNCE; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_ANNOUNCE;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_DESCRIBE; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_DESCRIBE;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_GET_PARAMETER; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_GET_PARAMETER;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_OPTIONS; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_OPTIONS;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_PAUSE; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_PAUSE;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_PLAY; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_PLAY;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_PLAY_NOTIFY; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_PLAY_NOTIFY;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_RECORD; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_RECORD;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_REDIRECT; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_REDIRECT;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_SETUP; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_SETUP;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_SET_PARAMETER; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_SET_PARAMETER;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_TEARDOWN; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_TEARDOWN;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_UNSET; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_UNSET;
import static com.google.android.exoplayer2.util.Assertions.checkArgument; import static com.google.android.exoplayer2.util.Assertions.checkArgument;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import static com.google.android.exoplayer2.util.Assertions.checkState; import static com.google.android.exoplayer2.util.Assertions.checkState;
@ -42,20 +42,7 @@ import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.ParserException; import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.source.rtsp.RtspMediaPeriod.RtpLoadInfo; import com.google.android.exoplayer2.source.rtsp.RtspMediaPeriod.RtpLoadInfo;
import com.google.android.exoplayer2.source.rtsp.RtspMediaSource.RtspPlaybackException; import com.google.android.exoplayer2.source.rtsp.RtspMediaSource.RtspPlaybackException;
import com.google.android.exoplayer2.source.rtsp.message.RtspDescribeResponse; import com.google.android.exoplayer2.source.rtsp.RtspMessageUtil.RtspSessionHeader;
import com.google.android.exoplayer2.source.rtsp.message.RtspHeaders;
import com.google.android.exoplayer2.source.rtsp.message.RtspMessageChannel;
import com.google.android.exoplayer2.source.rtsp.message.RtspMessageUtil;
import com.google.android.exoplayer2.source.rtsp.message.RtspMessageUtil.RtspSessionHeader;
import com.google.android.exoplayer2.source.rtsp.message.RtspOptionsResponse;
import com.google.android.exoplayer2.source.rtsp.message.RtspPlayResponse;
import com.google.android.exoplayer2.source.rtsp.message.RtspRequest;
import com.google.android.exoplayer2.source.rtsp.message.RtspResponse;
import com.google.android.exoplayer2.source.rtsp.message.RtspSetupResponse;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpPayloadFormat;
import com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription;
import com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription;
import com.google.android.exoplayer2.source.rtsp.sdp.SessionDescriptionParser;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;

View File

@ -13,12 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
import com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription;
/** Represents an RTSP DESCRIBE response. */ /** Represents an RTSP DESCRIBE response. */
public final class RtspDescribeResponse { /* package */ final class RtspDescribeResponse {
/** The response's status code. */ /** The response's status code. */
public final int status; public final int status;
/** The {@link SessionDescription} (see RFC2327) in the DESCRIBE response. */ /** The {@link SessionDescription} (see RFC2327) in the DESCRIBE response. */

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
@ -33,7 +33,7 @@ import java.util.Map;
* with case-insensitive header names. The extra spaces around header names and values are trimmed. * with case-insensitive header names. The extra spaces around header names and values are trimmed.
* Contrary to HTTP, RTSP does not allow ambiguous/arbitrary header names (RFC 2326 Section 12). * Contrary to HTTP, RTSP does not allow ambiguous/arbitrary header names (RFC 2326 Section 12).
*/ */
public final class RtspHeaders { /* package */ final class RtspHeaders {
public static final String ACCEPT = "Accept"; public static final String ACCEPT = "Accept";
public static final String ALLOW = "Allow"; public static final String ALLOW = "Allow";

View File

@ -43,8 +43,6 @@ import com.google.android.exoplayer2.source.TrackGroup;
import com.google.android.exoplayer2.source.TrackGroupArray; import com.google.android.exoplayer2.source.TrackGroupArray;
import com.google.android.exoplayer2.source.rtsp.RtspClient.PlaybackEventListener; import com.google.android.exoplayer2.source.rtsp.RtspClient.PlaybackEventListener;
import com.google.android.exoplayer2.source.rtsp.RtspMediaSource.RtspPlaybackException; import com.google.android.exoplayer2.source.rtsp.RtspMediaSource.RtspPlaybackException;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpDataChannel;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpDataLoadable;
import com.google.android.exoplayer2.trackselection.ExoTrackSelection; import com.google.android.exoplayer2.trackselection.ExoTrackSelection;
import com.google.android.exoplayer2.trackselection.TrackSelection; import com.google.android.exoplayer2.trackselection.TrackSelection;
import com.google.android.exoplayer2.upstream.Allocator; import com.google.android.exoplayer2.upstream.Allocator;
@ -61,7 +59,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/** A {@link MediaPeriod} that loads an RTSP stream. */ /** A {@link MediaPeriod} that loads an RTSP stream. */
public final class RtspMediaPeriod implements MediaPeriod { /* package */ final class RtspMediaPeriod implements MediaPeriod {
private static final String TAG = "RtspMediaPeriod"; private static final String TAG = "RtspMediaPeriod";
/** The maximum times to retry if the underlying data channel failed to bind. */ /** The maximum times to retry if the underlying data channel failed to bind. */

View File

@ -31,7 +31,6 @@ import com.google.android.exoplayer2.source.MediaSource;
import com.google.android.exoplayer2.source.MediaSourceFactory; import com.google.android.exoplayer2.source.MediaSourceFactory;
import com.google.android.exoplayer2.source.SinglePeriodTimeline; import com.google.android.exoplayer2.source.SinglePeriodTimeline;
import com.google.android.exoplayer2.source.rtsp.RtspClient.SessionInfoListener; import com.google.android.exoplayer2.source.rtsp.RtspClient.SessionInfoListener;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpDataChannel;
import com.google.android.exoplayer2.upstream.Allocator; import com.google.android.exoplayer2.upstream.Allocator;
import com.google.android.exoplayer2.upstream.HttpDataSource; import com.google.android.exoplayer2.upstream.HttpDataSource;
import com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy; import com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy;

View File

@ -15,10 +15,10 @@
*/ */
package com.google.android.exoplayer2.source.rtsp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.source.rtsp.rtp.RtpPayloadFormat.getMimeTypeFromRtpMediaType; import static com.google.android.exoplayer2.source.rtsp.MediaDescription.MEDIA_TYPE_AUDIO;
import static com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription.MEDIA_TYPE_AUDIO; import static com.google.android.exoplayer2.source.rtsp.RtpPayloadFormat.getMimeTypeFromRtpMediaType;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_CONTROL; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_CONTROL;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_RTPMAP; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_RTPMAP;
import static com.google.android.exoplayer2.util.Assertions.checkArgument; import static com.google.android.exoplayer2.util.Assertions.checkArgument;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import static com.google.android.exoplayer2.util.NalUnitUtil.NAL_START_CODE; import static com.google.android.exoplayer2.util.NalUnitUtil.NAL_START_CODE;
@ -31,8 +31,6 @@ import androidx.annotation.VisibleForTesting;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.audio.AacUtil; import com.google.android.exoplayer2.audio.AacUtil;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpPayloadFormat;
import com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription;
import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.NalUnitUtil; import com.google.android.exoplayer2.util.NalUnitUtil;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
@ -40,7 +38,7 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
/** Represents a media track in an RTSP playback. */ /** Represents a media track in an RTSP playback. */
public final class RtspMediaTrack { /* package */ final class RtspMediaTrack {
// Format specific parameter names. // Format specific parameter names.
private static final String PARAMETER_PROFILE_LEVEL_ID = "profile-level-id"; private static final String PARAMETER_PROFILE_LEVEL_ID = "profile-level-id";
private static final String PARAMETER_SPROP_PARAMS = "sprop-parameter-sets"; private static final String PARAMETER_SPROP_PARAMS = "sprop-parameter-sets";

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.util.Assertions.checkStateNotNull; import static com.google.android.exoplayer2.util.Assertions.checkStateNotNull;
@ -39,7 +39,7 @@ import java.util.List;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/** Sends and receives RTSP messages. */ /** Sends and receives RTSP messages. */
public final class RtspMessageChannel implements Closeable { /* package */ final class RtspMessageChannel implements Closeable {
private static final String TAG = "RtspMessageChannel"; private static final String TAG = "RtspMessageChannel";
private static final boolean LOG_RTSP_MESSAGES = false; private static final boolean LOG_RTSP_MESSAGES = false;

View File

@ -13,21 +13,21 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_ANNOUNCE; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_ANNOUNCE;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_DESCRIBE; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_DESCRIBE;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_GET_PARAMETER; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_GET_PARAMETER;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_OPTIONS; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_OPTIONS;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_PAUSE; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_PAUSE;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_PLAY; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_PLAY;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_PLAY_NOTIFY; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_PLAY_NOTIFY;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_RECORD; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_RECORD;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_REDIRECT; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_REDIRECT;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_SETUP; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_SETUP;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_SET_PARAMETER; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_SET_PARAMETER;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_TEARDOWN; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_TEARDOWN;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_UNSET; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_UNSET;
import static com.google.android.exoplayer2.util.Assertions.checkArgument; import static com.google.android.exoplayer2.util.Assertions.checkArgument;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
@ -45,7 +45,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** Utility methods for RTSP messages. */ /** Utility methods for RTSP messages. */
public final class RtspMessageUtil { /* package */ final class RtspMessageUtil {
/** Represents a RTSP Session header (RFC2326 Section 12.37). */ /** Represents a RTSP Session header (RFC2326 Section 12.37). */
public static final class RtspSessionHeader { public static final class RtspSessionHeader {
/** The session ID. */ /** The session ID. */

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import java.util.List; import java.util.List;
@ -21,7 +21,7 @@ import java.util.List;
/** Represents an RTSP OPTIONS response. */ /** Represents an RTSP OPTIONS response. */
// TODO(b/180434754) Move all classes under message to the parent rtsp package, and change the // TODO(b/180434754) Move all classes under message to the parent rtsp package, and change the
// visibility. // visibility.
public final class RtspOptionsResponse { /* package */ final class RtspOptionsResponse {
/** The response's status code. */ /** The response's status code. */
public final int status; public final int status;
/** /**

View File

@ -13,15 +13,13 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
import com.google.android.exoplayer2.source.rtsp.RtspSessionTiming;
import com.google.android.exoplayer2.source.rtsp.RtspTrackTiming;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import java.util.List; import java.util.List;
/** Represents an RTSP PLAY response. */ /** Represents an RTSP PLAY response. */
public final class RtspPlayResponse { /* package */ final class RtspPlayResponse {
/** The response's status code. */ /** The response's status code. */
public final int status; public final int status;
/** The playback start timing, {@link RtspSessionTiming#DEFAULT} if not present. */ /** The playback start timing, {@link RtspSessionTiming#DEFAULT} if not present. */

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
import android.net.Uri; import android.net.Uri;
import androidx.annotation.IntDef; import androidx.annotation.IntDef;
@ -23,7 +23,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
/** Represents an RTSP request. */ /** Represents an RTSP request. */
public final class RtspRequest { /* package */ final class RtspRequest {
/** /**
* RTSP request methods, as defined in RFC2326 Section 10. * RTSP request methods, as defined in RFC2326 Section 10.
* *

View File

@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
/** Represents an RTSP Response. */ /** Represents an RTSP Response. */
public final class RtspResponse { /* package */ final class RtspResponse {
// TODO(b/172331505) Move this constant to MimeTypes. // TODO(b/172331505) Move this constant to MimeTypes.
/** The MIME type associated with Session Description Protocol (RFC4566). */ /** The MIME type associated with Session Description Protocol (RFC4566). */
public static final String SDP_MIME_TYPE = "application/sdp"; public static final String SDP_MIME_TYPE = "application/sdp";

View File

@ -30,7 +30,7 @@ import java.util.regex.Pattern;
* *
* <p>Currently only NPT is supported. See RFC2326 Section 3.6 for detail of NPT. * <p>Currently only NPT is supported. See RFC2326 Section 3.6 for detail of NPT.
*/ */
public final class RtspSessionTiming { /* package */ final class RtspSessionTiming {
/** The default session timing starting from 0.000 and indefinite length, effectively live. */ /** The default session timing starting from 0.000 and indefinite length, effectively live. */
public static final RtspSessionTiming DEFAULT = public static final RtspSessionTiming DEFAULT =
new RtspSessionTiming(/* startTimeMs= */ 0, /* stopTimeMs= */ C.TIME_UNSET); new RtspSessionTiming(/* startTimeMs= */ 0, /* stopTimeMs= */ C.TIME_UNSET);

View File

@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
/** Represents an RTSP SETUP response. */ /** Represents an RTSP SETUP response. */
// TODO(b/180434754) Move all classes under message to the parent rtsp package, and change the // TODO(b/180434754) Move all classes under message to the parent rtsp package, and change the
// visibility. // visibility.
public final class RtspSetupResponse { /* package */ final class RtspSetupResponse {
/** The response's status code. */ /** The response's status code. */
public final int status; public final int status;

View File

@ -19,7 +19,6 @@ import android.net.Uri;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.ParserException; import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.source.rtsp.message.RtspHeaders;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
@ -29,7 +28,7 @@ import com.google.common.collect.ImmutableList;
* *
* <p>The fields {@link #rtpTimestamp} and {@link #sequenceNumber} will not both be {@code null}. * <p>The fields {@link #rtpTimestamp} and {@link #sequenceNumber} will not both be {@code null}.
*/ */
public final class RtspTrackTiming { /* package */ final class RtspTrackTiming {
/** /**
* Parses the RTP-Info header into a list of {@link RtspTrackTiming RtspTrackTimings}. * Parses the RTP-Info header into a list of {@link RtspTrackTiming RtspTrackTimings}.

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.sdp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.util.Util.castNonNull; import static com.google.android.exoplayer2.util.Util.castNonNull;
@ -31,7 +31,7 @@ import com.google.common.collect.ImmutableMap;
* <p>SDP messages encapsulate information on the media play back session, including session * <p>SDP messages encapsulate information on the media play back session, including session
* configuration information, formats of each playable track, etc. SDP is defined in RFC4566. * configuration information, formats of each playable track, etc. SDP is defined in RFC4566.
*/ */
public final class SessionDescription { /* package */ final class SessionDescription {
/** Builder class for {@link SessionDescription}. */ /** Builder class for {@link SessionDescription}. */
public static final class Builder { public static final class Builder {

View File

@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.sdp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.SUPPORTED_SDP_VERSION; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.SUPPORTED_SDP_VERSION;
import static com.google.android.exoplayer2.util.Assertions.checkArgument; import static com.google.android.exoplayer2.util.Assertions.checkArgument;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import static com.google.common.base.Strings.nullToEmpty; import static com.google.common.base.Strings.nullToEmpty;
@ -29,7 +29,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/** Parses a String based SDP message into {@link SessionDescription}. */ /** Parses a String based SDP message into {@link SessionDescription}. */
public final class SessionDescriptionParser { /* package */ final class SessionDescriptionParser {
// SDP line always starts with an one letter tag, followed by an equal sign. The information // SDP line always starts with an one letter tag, followed by an equal sign. The information
// under the given tag follows an optional space. // under the given tag follows an optional space.
private static final Pattern SDP_LINE_PATTERN = Pattern.compile("([a-z])=\\s?(.+)"); private static final Pattern SDP_LINE_PATTERN = Pattern.compile("([a-z])=\\s?(.+)");

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp;
import android.net.Uri; import android.net.Uri;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@ -23,7 +23,7 @@ import com.google.android.exoplayer2.upstream.UdpDataSource;
import java.io.IOException; import java.io.IOException;
/** An {@link RtpDataChannel} for UDP transport. */ /** An {@link RtpDataChannel} for UDP transport. */
public final class UdpDataSourceRtpDataChannel implements RtpDataChannel { /* package */ final class UdpDataSourceRtpDataChannel implements RtpDataChannel {
private final UdpDataSource dataSource; private final UdpDataSource dataSource;
/** Creates a new instance. */ /** Creates a new instance. */

View File

@ -1,19 +0,0 @@
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@NonNullApi
package com.google.android.exoplayer2.source.rtsp.message;
import com.google.android.exoplayer2.util.NonNullApi;

View File

@ -14,16 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp.reader; package com.google.android.exoplayer2.source.rtsp.reader;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpPayloadFormat; import com.google.android.exoplayer2.source.rtsp.RtpPayloadFormat;
import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.MimeTypes;
/** Default {@link RtpPayloadReader.Factory} implementation. */ /** Default {@link RtpPayloadReader.Factory} implementation. */
public final class DefaultRtpPayloadReaderFactory implements RtpPayloadReader.Factory { /* package */ public final class DefaultRtpPayloadReaderFactory
implements RtpPayloadReader.Factory {
@Override @Override
@Nullable @Nullable

View File

@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp.reader; package com.google.android.exoplayer2.source.rtsp.reader;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.extractor.ExtractorOutput; import com.google.android.exoplayer2.extractor.ExtractorOutput;
import com.google.android.exoplayer2.extractor.TrackOutput; import com.google.android.exoplayer2.extractor.TrackOutput;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpPayloadFormat; import com.google.android.exoplayer2.source.rtsp.RtpPayloadFormat;
import com.google.android.exoplayer2.util.ParsableBitArray; import com.google.android.exoplayer2.util.ParsableBitArray;
import com.google.android.exoplayer2.util.ParsableByteArray; import com.google.android.exoplayer2.util.ParsableByteArray;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp.reader; package com.google.android.exoplayer2.source.rtsp.reader;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import static com.google.android.exoplayer2.util.Assertions.checkState; import static com.google.android.exoplayer2.util.Assertions.checkState;
@ -23,14 +23,14 @@ import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.audio.Ac3Util; import com.google.android.exoplayer2.audio.Ac3Util;
import com.google.android.exoplayer2.extractor.ExtractorOutput; import com.google.android.exoplayer2.extractor.ExtractorOutput;
import com.google.android.exoplayer2.extractor.TrackOutput; import com.google.android.exoplayer2.extractor.TrackOutput;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpPayloadFormat; import com.google.android.exoplayer2.source.rtsp.RtpPayloadFormat;
import com.google.android.exoplayer2.util.ParsableBitArray; import com.google.android.exoplayer2.util.ParsableBitArray;
import com.google.android.exoplayer2.util.ParsableByteArray; import com.google.android.exoplayer2.util.ParsableByteArray;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/** Parses an AC3 byte stream carried on RTP packets, and extracts AC3 frames. */ /** Parses an AC3 byte stream carried on RTP packets, and extracts AC3 frames. */
public final class RtpAc3Reader implements RtpPayloadReader { /* package */ public final class RtpAc3Reader implements RtpPayloadReader {
/** AC3 frame types defined in RFC4184 Section 4.1.1. */ /** AC3 frame types defined in RFC4184 Section 4.1.1. */
private static final int AC3_FRAME_TYPE_COMPLETE_FRAME = 0; private static final int AC3_FRAME_TYPE_COMPLETE_FRAME = 0;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp.reader; package com.google.android.exoplayer2.source.rtsp.reader;
import static com.google.android.exoplayer2.util.Assertions.checkStateNotNull; import static com.google.android.exoplayer2.util.Assertions.checkStateNotNull;
import static com.google.android.exoplayer2.util.Util.castNonNull; import static com.google.android.exoplayer2.util.Util.castNonNull;
@ -23,8 +23,8 @@ import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.ParserException; import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.extractor.ExtractorOutput; import com.google.android.exoplayer2.extractor.ExtractorOutput;
import com.google.android.exoplayer2.extractor.TrackOutput; import com.google.android.exoplayer2.extractor.TrackOutput;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpPacket; import com.google.android.exoplayer2.source.rtsp.RtpPacket;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpPayloadFormat; import com.google.android.exoplayer2.source.rtsp.RtpPayloadFormat;
import com.google.android.exoplayer2.util.NalUnitUtil; import com.google.android.exoplayer2.util.NalUnitUtil;
import com.google.android.exoplayer2.util.ParsableByteArray; import com.google.android.exoplayer2.util.ParsableByteArray;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;

View File

@ -14,16 +14,16 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp.reader; package com.google.android.exoplayer2.source.rtsp.reader;
import com.google.android.exoplayer2.ParserException; import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.extractor.ExtractorOutput; import com.google.android.exoplayer2.extractor.ExtractorOutput;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpPayloadFormat; import com.google.android.exoplayer2.source.rtsp.RtpPayloadFormat;
import com.google.android.exoplayer2.util.ParsableByteArray; import com.google.android.exoplayer2.util.ParsableByteArray;
import org.checkerframework.checker.nullness.qual.Nullable; import org.checkerframework.checker.nullness.qual.Nullable;
/** Extracts media samples from the payload of received RTP packets. */ /** Extracts media samples from the payload of received RTP packets. */
public interface RtpPayloadReader { /* package */ public interface RtpPayloadReader {
/** Factory of {@link RtpPayloadReader} instances. */ /** Factory of {@link RtpPayloadReader} instances. */
interface Factory { interface Factory {

View File

@ -14,6 +14,6 @@
* limitations under the License. * limitations under the License.
*/ */
@NonNullApi @NonNullApi
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp.reader;
import com.google.android.exoplayer2.util.NonNullApi; import com.google.android.exoplayer2.util.NonNullApi;

View File

@ -1,19 +0,0 @@
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@NonNullApi
package com.google.android.exoplayer2.source.rtsp.rtp.reader;
import com.google.android.exoplayer2.util.NonNullApi;

View File

@ -1,19 +0,0 @@
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@NonNullApi
package com.google.android.exoplayer2.source.rtsp.sdp;
import com.google.android.exoplayer2.util.NonNullApi;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2020 The Android Open Source Project * Copyright 2021 The Android Open Source Project
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2020 The Android Open Source Project * Copyright 2021 The Android Open Source Project
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import static com.google.android.exoplayer2.util.Util.getBytesFromHexString; import static com.google.android.exoplayer2.util.Util.getBytesFromHexString;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;

View File

@ -23,9 +23,6 @@ import androidx.annotation.Nullable;
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.source.MediaPeriod; import com.google.android.exoplayer2.source.MediaPeriod;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpDataChannel;
import com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription;
import com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription;
import com.google.android.exoplayer2.upstream.DefaultAllocator; import com.google.android.exoplayer2.upstream.DefaultAllocator;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;

View File

@ -15,20 +15,18 @@
*/ */
package com.google.android.exoplayer2.source.rtsp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription.MEDIA_TYPE_AUDIO; import static com.google.android.exoplayer2.source.rtsp.MediaDescription.MEDIA_TYPE_AUDIO;
import static com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription.MEDIA_TYPE_VIDEO; import static com.google.android.exoplayer2.source.rtsp.MediaDescription.MEDIA_TYPE_VIDEO;
import static com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription.RTP_AVP_PROFILE; import static com.google.android.exoplayer2.source.rtsp.MediaDescription.RTP_AVP_PROFILE;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_CONTROL; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_CONTROL;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_FMTP; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_FMTP;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_RTPMAP; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_RTPMAP;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertThrows;
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.audio.AacUtil; import com.google.android.exoplayer2.audio.AacUtil;
import com.google.android.exoplayer2.source.rtsp.rtp.RtpPayloadFormat;
import com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription;
import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.MimeTypes;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.message; package com.google.android.exoplayer2.source.rtsp;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;

View File

@ -15,16 +15,11 @@
*/ */
package com.google.android.exoplayer2.source.rtsp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.source.rtsp.message.RtspRequest.METHOD_OPTIONS; import static com.google.android.exoplayer2.source.rtsp.RtspRequest.METHOD_OPTIONS;
import static com.google.android.exoplayer2.util.Assertions.checkNotNull; import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import com.google.android.exoplayer2.source.rtsp.message.RtspHeaders;
import com.google.android.exoplayer2.source.rtsp.message.RtspMessageChannel;
import com.google.android.exoplayer2.source.rtsp.message.RtspMessageUtil;
import com.google.android.exoplayer2.source.rtsp.message.RtspRequest;
import com.google.android.exoplayer2.source.rtsp.message.RtspResponse;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
import java.io.Closeable; import java.io.Closeable;
import java.io.IOException; import java.io.IOException;

View File

@ -14,17 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.sdp; package com.google.android.exoplayer2.source.rtsp;
import static com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription.MEDIA_TYPE_AUDIO; import static com.google.android.exoplayer2.source.rtsp.MediaDescription.MEDIA_TYPE_AUDIO;
import static com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription.MEDIA_TYPE_VIDEO; import static com.google.android.exoplayer2.source.rtsp.MediaDescription.MEDIA_TYPE_VIDEO;
import static com.google.android.exoplayer2.source.rtsp.sdp.MediaDescription.RTP_AVP_PROFILE; import static com.google.android.exoplayer2.source.rtsp.MediaDescription.RTP_AVP_PROFILE;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_CONTROL; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_CONTROL;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_FMTP; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_FMTP;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_RANGE; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_RANGE;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_RTPMAP; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_RTPMAP;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_TOOL; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_TOOL;
import static com.google.android.exoplayer2.source.rtsp.sdp.SessionDescription.ATTR_TYPE; import static com.google.android.exoplayer2.source.rtsp.SessionDescription.ATTR_TYPE;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertThrows;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.source.rtsp.rtp; package com.google.android.exoplayer2.source.rtsp.reader;
import static com.google.android.exoplayer2.util.Util.getBytesFromHexString; import static com.google.android.exoplayer2.util.Util.getBytesFromHexString;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
@ -23,7 +23,8 @@ import static org.mockito.Mockito.when;
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.extractor.ExtractorOutput; import com.google.android.exoplayer2.extractor.ExtractorOutput;
import com.google.android.exoplayer2.source.rtsp.rtp.reader.RtpAc3Reader; import com.google.android.exoplayer2.source.rtsp.RtpPacket;
import com.google.android.exoplayer2.source.rtsp.RtpPayloadFormat;
import com.google.android.exoplayer2.testutil.FakeTrackOutput; import com.google.android.exoplayer2.testutil.FakeTrackOutput;
import com.google.android.exoplayer2.util.MimeTypes; import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.ParsableByteArray; import com.google.android.exoplayer2.util.ParsableByteArray;