Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[video_player_avplay] Add get streaming property interface and Update SetStreamingProperty interface #672

Merged

Conversation

xiaowei-guan
Copy link
Contributor

@xiaowei-guan xiaowei-guan commented Feb 28, 2024

GetStreamingProperty Interface

/// Retrieves a specific property value obtained by the streaming engine (Smooth Streaming, HLS, DASH, or Widevine).
  Future<String> getStreamingProperty(StreamingPropertyType type)

SetStreamingProperty interface

    _controller = VideoPlayerController.network(
        'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8',
        streamingProperty: <StreamingPropertyType, String>{
          StreamingPropertyType.setMode4K: 'true',
          StreamingPropertyType.prebufferMode: '50000'
        });

StreamingPropertyType

/// The streaming property type.
enum StreamingPropertyType {
  /// HTTP request cookie used to establish the session with the HTTP server.
  cookie,

  /// HTTP user agent, used in the HTTP request header.
  userAgent,

  /// Property to initiate prebuffering mode. The second parameter indicates start-time for prebuffered content, in milliseconds.
  prebufferMode,

  /// Sets a custom streaming URL with various streaming parameters, such as "BITRATES", "STARTBITRATE", or "SKIPBITRATE".
  /// String containing custom attributes for adaptive streaming playback.
  /// "STARTBITRATE=" Valid values are "LOWEST", "HIGHEST", and "AVERAGE". You can also define a specific bandwidth for the start of playback.
  /// "BITRATES=" Use '~' to define a bandwidth range (5000 ~ 20000). You can also define a specific bandwidth for playback.
  /// "SKIPBITRATE=" Defines the bandwidth to use after a skip operation.
  /// "STARTFRAGMENT=" For live content playback, defines the start fragment number.
  /// "FIXED_MAX_RESOLUTION=max_widthXmax_height". Only if the given media URI such as mpd in MPEG-DASH or m3u8 in HLS through open()
  ///  method doesn't describe entire required video resolutions,application should use this attribute to complete the resolution information for the player.
  adaptiveInfo,

  /// Forces the player to use the 4K UHD decoder. Its parameter can be the string "TRUE" or "FALSE".
  /// In the case of adaptive streaming which requires stream-change for different video resolution during the playback,
  /// Only if the given media URI such as mpd in MPEG-DASH or m3u8 in HLS through open() method doesn't describe entire required video resolutions,
  /// pass TRUE with this property in IDLE state.
  setMode4K,

  /// For the Smooth Streaming case, configures the player to listen for a "Sparse name" configured through "propertyParam" . The sparse track name is a string.
  listenSparseTrack,

  /// Whether the stream is LIVE or VOD. Applicable to all streaming types.
  isLive,

  /// String listing the available bit-rates for the currently-playing stream.
  availableBitrate,

  /// String describing the duration of live content.
  getLiveDuration,

  /// String describing the current streaming bandwidth.
  currentBandwidth,

  /// Property used for enabling/initializing video mixer feature on B2B product only. It should be set before
  /// setting SET_MIXEDFRAME property on the player.
  useVideoMixer,

  /// Property to set the position of mixed frame. setDisplayRect with required position on corresponding
  ///  player instance to be called before setting this property.
  setMixedFrame,

  /// Property to force the playback the video in potrait mode on B2B proudct only.
  portraitMode,

  /// Property to select the Scaler type, By Default MAIN Scaler selected.
  inAppMultiView,
}

@xiaowei-guan xiaowei-guan changed the title [video_player_avplay] Add get streaming property interface. [video_player_avplay] Add get streaming property interface and Update SetStreamingProperty interface Feb 29, 2024
@JSUYA
Copy link
Member

JSUYA commented Mar 7, 2024

It's not because of this PR, but a crash occurs when running the avplay example in my environment. So I couldn't test it.
I found belows from dump log.

[  345.722485] send signal from KERNEL, SIG : 6, mmhttpsrc_task(6229), handler:b388b815 send_sig_from_kernel_ratelimited
[  345.722502] send signal SIG : 6, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:b388b815 send_signal_ratelimited
[  345.722588] audit: type=1400 audit(1709795872.916:3): lsm=SMACK fn=smack_inode_getattr action=denied mode=enforcing subject="User::Pkg::org.tizen.video_player_avplay_example" object="System::Privileged" requested=r ppid=448 ppid_comm="launchpad-proce" pid=5949 comm="mmhttpsrc_task" path="/tmp/play_log.txt" dev="tmpfs" ino=30190
[  345.729264] [6229][#0  0xb5ff7a0c in ___lxstat64 () from /usr/lib/libc-2.30.so]
[  345.729273] [6229][#1  0x9c1e47a9 in ??]
[  345.729490] send signal SIG : 6, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:00000000 send_signal_ratelimited
[  345.729518] send signal from KERNEL, SIG : 11, mmhttpsrc_task(6229), handler:b388b9e9 send_sig_from_kernel_ratelimited
[  345.729532] send signal SIG : 11, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:b388b9e9 send_signal_ratelimited
[  345.730062] send signal SIG : 11, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:b60ae0a8 send_signal_ratelimited
[  345.730152] send signal SIG : 11, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:00000000 send_signal_ratelimited
[  345.730169] deliver signal SIG : 11, mmhttpsrc_task(6229), DN_play_example(5949), print_deliver_signal
[  345.730441] mmhttpsrc_task: unhandled page fault (11) at 0x00000004, code 0x005

Does this mean that the .so files related to plusplayer need updating?

@xiaowei-guan
Copy link
Contributor Author

It's not because of this PR, but a crash occurs when running the avplay example in my environment. So I couldn't test it. I found belows from dump log.

[  345.722485] send signal from KERNEL, SIG : 6, mmhttpsrc_task(6229), handler:b388b815 send_sig_from_kernel_ratelimited
[  345.722502] send signal SIG : 6, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:b388b815 send_signal_ratelimited
[  345.722588] audit: type=1400 audit(1709795872.916:3): lsm=SMACK fn=smack_inode_getattr action=denied mode=enforcing subject="User::Pkg::org.tizen.video_player_avplay_example" object="System::Privileged" requested=r ppid=448 ppid_comm="launchpad-proce" pid=5949 comm="mmhttpsrc_task" path="/tmp/play_log.txt" dev="tmpfs" ino=30190
[  345.729264] [6229][#0  0xb5ff7a0c in ___lxstat64 () from /usr/lib/libc-2.30.so]
[  345.729273] [6229][#1  0x9c1e47a9 in ??]
[  345.729490] send signal SIG : 6, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:00000000 send_signal_ratelimited
[  345.729518] send signal from KERNEL, SIG : 11, mmhttpsrc_task(6229), handler:b388b9e9 send_sig_from_kernel_ratelimited
[  345.729532] send signal SIG : 11, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:b388b9e9 send_signal_ratelimited
[  345.730062] send signal SIG : 11, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:b60ae0a8 send_signal_ratelimited
[  345.730152] send signal SIG : 11, mmhttpsrc_task(6229)->mmhttpsrc_task(6229) handler:00000000 send_signal_ratelimited
[  345.730169] deliver signal SIG : 11, mmhttpsrc_task(6229), DN_play_example(5949), print_deliver_signal
[  345.730441] mmhttpsrc_task: unhandled page fault (11) at 0x00000004, code 0x005

Does this mean that the .so files related to plusplayer need updating?

Do you use certificate of partner?

@xiaowei-guan xiaowei-guan merged commit 7a4d26f into flutter-tizen:master Mar 11, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants