瀏覽代碼

VLCMedia: remove statistics no longer provided by libvlc

Support for sout statitics was removed in ef4b89c3
Felix Paul Kühne 5 年之前
父節點
當前提交
85d2f5b513
共有 2 個文件被更改,包括 1 次插入52 次删除
  1. 0 15
      Headers/Public/VLCMedia.h
  2. 1 37
      Sources/VLCMedia.m

+ 0 - 15
Headers/Public/VLCMedia.h

@@ -634,21 +634,6 @@ typedef int VLCMediaParsingOptions;
 @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfLostAudioBuffers;
 
 /**
- * returns the total number of packets sent during the current media session
- * \return a NSInteger with the total number of sent packets
- */
-@property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfSentPackets;
-/**
- * returns the total number of raw bytes sent during the current media session
- * \return a NSInteger with the total number of sent bytes
- */
-@property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfSentBytes;
-/**
- * returns the current bitrate of sent bytes
- * \return a float of the current bitrate of sent bits
- */
-@property (NS_NONATOMIC_IOSONLY, readonly) float streamOutputBitrate;
-/**
  * returns the total number of corrupted data packets during current sout session
  * \note value is 0 on non-stream-output operations
  * \return a NSInteger with the total number of corrupted data packets

+ 1 - 37
Sources/VLCMedia.m

@@ -506,7 +506,6 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
     return @{
         @"demuxBitrate" : @(p_stats.f_demux_bitrate),
         @"inputBitrate" : @(p_stats.f_input_bitrate),
-        @"sendBitrate" : @(p_stats.f_send_bitrate),
         @"decodedAudio" : @(p_stats.i_decoded_audio),
         @"decodedVideo" : @(p_stats.i_decoded_video),
         @"demuxCorrupted" : @(p_stats.i_demux_corrupted),
@@ -516,9 +515,7 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
         @"lostAbuffers" : @(p_stats.i_lost_abuffers),
         @"lostPictures" : @(p_stats.i_lost_pictures),
         @"playedAbuffers" : @(p_stats.i_played_abuffers),
-        @"readBytes" : @(p_stats.i_read_bytes),
-        @"sentBytes" : @(p_stats.i_sent_bytes),
-        @"sentPackets" : @(p_stats.i_sent_packets)
+        @"readBytes" : @(p_stats.i_read_bytes)
     };
 }
 
@@ -632,39 +629,6 @@ static void HandleMediaParsedChanged(const libvlc_event_t * event, void * self)
     return p_stats.i_lost_abuffers;
 }
 
-- (NSInteger)numberOfSentPackets
-{
-    if (!p_md)
-        return 0;
-
-    libvlc_media_stats_t p_stats;
-    libvlc_media_get_stats(p_md, &p_stats);
-
-    return p_stats.i_sent_packets;
-}
-
-- (NSInteger)numberOfSentBytes
-{
-    if (!p_md)
-        return 0;
-
-    libvlc_media_stats_t p_stats;
-    libvlc_media_get_stats(p_md, &p_stats);
-
-    return p_stats.i_sent_bytes;
-}
-
-- (float)streamOutputBitrate
-{
-    if (!p_md)
-        return .0;
-
-    libvlc_media_stats_t p_stats;
-    libvlc_media_get_stats(p_md, &p_stats);
-
-    return p_stats.f_send_bitrate;
-}
-
 - (NSInteger)numberOfCorruptedDataPackets
 {
     if (!p_md)