Skip to content

Commit

Permalink
docs(README): add support for enhanced RTMP
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Oct 21, 2023
1 parent ebad206 commit 5887764
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ android {
* File: TS or FLV
* Write to a single file or multiple chunk files
* Streaming: RTMP/RTMPS or SRT
* Support for enhanced RTMP
* Ultra low-latency based on [SRT](https://github.com/Haivision/srt)
* Network adaptive bitrate mechanism for [SRT](https://github.com/Haivision/srt)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ExtendedVideoTag(

// ExVideoTagHeader
buffer.put(
(1 shl 7) or // IsExHeader
0x80 or // IsExHeader
(frameType.value shl 4) or // Frame Type
packetType.value // PacketType
)
Expand All @@ -78,7 +78,6 @@ class ExtendedVideoTag(
override val tagHeaderSize = VIDEO_TAG_HEADER_SIZE

override fun writeBody(buffer: ByteBuffer) {
Logger.e(TAG, "PacketType $packetType")
when (packetType) {
PacketType.META_DATA -> {
throw NotImplementedError("PacketType $packetType is not supported for $mimeType")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,4 @@ class AudioOnlyRtmpLiveStreamer(
endpoint = RtmpProducer(hasAudio = true, hasVideo = false),
initialOnErrorListener = initialOnErrorListener,
initialOnConnectionListener = initialOnConnectionListener
) {
private val rtmpProducer = endpoint as RtmpProducer
override suspend fun connect(url: String) {
require(videoConfig != null) {
"Video config must be set before connecting to send the video codec in the connect message"
}
val codecMimeType = videoConfig!!.mimeType
if (ExtendedVideoTag.isSupportedCodec(codecMimeType)) {
rtmpProducer.supportedVideoCodecs = listOf(codecMimeType)
}
rtmpProducer.supportedVideoCodecs = listOf(videoConfig!!.mimeType)
super.connect(url)
}
}
)

0 comments on commit 5887764

Please sign in to comment.