Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-129466

[gstreamer] add a gst_discoverer API to obtain metadata

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • Multimedia
    • None
    • Multimedia wk 39-40, Multimedia wk 41-42

    Description

      gstreamer provides a high-level API to obtain metadata. https://gstreamer.freedesktop.org/documentation/pbutils/gstdiscoverer.html?gi-language=c

      We should add a private API to wrap this API, as it allows improvements to QMediaPlayer.

      struct QGstDiscovererStreamInfo
      {
          int streamNumber{};
          QString streamID;
          QGstTagListHandle tags;
          QGstCaps caps;
      };
      
      struct QGstDiscovererVideoInfo : QGstDiscovererStreamInfo
      {
          QSize size;
          int bitDepth{};
          Fraction framerate{};
          Fraction pixelAspectRatio{};
          bool isInterlaced{};
          int bitrate{};
          int maxBitrate{};
          bool isImage{};
      };
      
      struct QGstDiscovererAudioInfo : QGstDiscovererStreamInfo
      {
          int channels{};
          uint64_t channelMask{};
          int sampleRate{};
          int bitsPerSample{};
          int bitrate{};
          int maxBitrate{};
          QLocale::Language language{};
      };
      
      struct QGstDiscovererSubtitleInfo : QGstDiscovererStreamInfo
      {
          QLocale::Language language{};
      };
      
      struct QGstDiscovererContainerInfo : QGstDiscovererStreamInfo
      {
          QGstTagListHandle tags;
      };
      
      struct QGstDiscovererInfo
      {
          bool isLive{};
          bool isSeekable{};
          std::optional<std::chrono::nanoseconds> duration;
      
          std::optional<QGstDiscovererContainerInfo> containerInfo;
          QGstTagListHandle tags;
          std::vector<QGstDiscovererVideoInfo> videoStreams;
          std::vector<QGstDiscovererAudioInfo> audioStreams;
          std::vector<QGstDiscovererSubtitleInfo> subtitleStreams;
          std::vector<QGstDiscovererContainerInfo> containerStreams;
      };
      
      ----
      
      QGstDiscoverer discoverer;
      QGstDiscovererInfo result = discoverer.discover(aUrl);
      
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              timblechmann tim blechmann
              timblechmann tim blechmann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change