fork/rust-sdks
git clone https://git.julia.blue/fork/rust-sdks
55bda13
main
1/* 2* Copyright 2023 LiveKit 3* 4* Licensed under the Apache License, Version 2.0 (the “License”); 5* you may not use this file except in compliance with the License. 6* You may obtain a copy of the License at 7* 8* http://www.apache.org/licenses/LICENSE-2.0 9* 10* Unless required by applicable law or agreed to in writing, software 11* distributed under the License is distributed on an “AS IS” BASIS, 12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13* See the License for the specific language governing permissions and 14* limitations under the License. 15*/ 16 17#pragma once 18 19#include <memory> 20 21#include "api/media_stream_interface.h" 22#include "livekit/helper.h" 23#include "livekit/webrtc.h" 24#include "rust/cxx.h" 25 26namespace livekit { 27class MediaStreamTrack ; 28}// namespace livekit 29#include "webrtc-sys/src/media_stream_track.rs.h" 30 31namespace livekit { 32 33class MediaStreamTrack { 34protected : 35MediaStreamTrack (std ::shared_ptr < RtcRuntime > , 36rtc ::scoped_refptr < webrtc ::MediaStreamTrackInterface > track ); 37 38public : 39rust ::String kind ()const ; 40rust ::String id ()const ; 41 42bool enabled ()const ; 43bool set_enabled (bool enable )const ; 44 45TrackState state ()const ; 46 47rtc ::scoped_refptr < webrtc ::MediaStreamTrackInterface > rtc_track ()const { 48return track_ ; 49 } 50 51protected : 52std ::shared_ptr < RtcRuntime > rtc_runtime_ ; 53rtc ::scoped_refptr < webrtc ::MediaStreamTrackInterface > track_ ; 54}; 55 56static std ::shared_ptr < MediaStreamTrack > _shared_media_stream_track () { 57return nullptr ;// Ignore 58} 59 60}// namespace livekit