Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
39e76682 by Dave Nicolson at 2026-05-28T06:57:50+00:00
chromecast: Improve stream type detection
- - - - -
1 changed file:
- modules/stream_out/chromecast/chromecast_communication.cpp
Changes:
=====================================
modules/stream_out/chromecast/chromecast_communication.cpp
=====================================
@@ -34,6 +34,7 @@
#include <iomanip>
+#include <vlc_input_item.h>
#include <vlc_url.h>
ChromecastCommunication::ChromecastCommunication( vlc_object_t* p_module,
@@ -368,12 +369,20 @@ std::string ChromecastCommunication::GetMedia( const
std::string& mime,
msg_Dbg( m_module, "s_chromecast_url: %s", chromecast_url.c_str());
+ const bool is_buffered = input_length > VLC_TICK_0;
+ const char *stream_type;
+ if (is_buffered)
+ stream_type = "BUFFERED";
+ else if (input_length == INPUT_DURATION_INDEFINITE)
+ stream_type = "LIVE";
+ else
+ stream_type = "NONE";
+
ss << "\"contentId\":\"" << chromecast_url << "\""
- << ",\"streamType\":\"" << ( input_length > VLC_TICK_0 ? "BUFFERED" :
"LIVE" ) << "\""
+ << ",\"streamType\":\"" << stream_type << "\""
<< ",\"contentType\":\"" << mime << "\"";
-
- if( input_length > VLC_TICK_0 )
+ if( is_buffered )
{
std::stringstream duration;
duration.setf( std::ios_base::fixed, std::ios_base::floatfield );
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/39e76682953ffd5357d0ee06e3b5a79512c3118d
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/39e76682953ffd5357d0ee06e3b5a79512c3118d
You're receiving this email because of your account on code.videolan.org.
Manage all notifications: https://code.videolan.org/-/profile/notifications |
Help: https://code.videolan.org/help
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits