Using GST_TAG_TRACK_NUMBER for selecting tracks / subsongs?

Stefan Sauer ensonic at hora-obscura.de
Wed May 18 05:41:41 UTC 2016


On 05/16/2016 02:22 AM, Carlos Rafael Giani wrote:
> Oh, I did not know of the TOC_SELECT event! Interesting.
>
> But, should I still use track_number/track_count to announce the
> current subsong and the number of subsongs? The latter seems redundant
> if there's a TOC, but would be consistent (= there would be track
> number & track count).
Still sending the track_number/track_count won't hurt. I'd also go for
using the toc.

Stefan
>
> On 2016-05-16 11:05, Tim Müller wrote:
>> On Mon, 2016-05-16 at 10:45 +0200, Carlos Rafael Giani wrote:
>>
>> Hi,
>>
>>> I was thinking of ways to allow application to select subsongs with
>>> my
>>> nonstream-audio plugins ( https://github.com/dv1/gst-nonstream-audio
>>> ).
>>> Then I stumbled upon GST_TAG_TRACK_NUMBER. Does it make sense to
>>> inject
>>> this into the pipeline and use that to select a "track" (= subsong)?
>>> Or
>>> is there a better way? I know of the TOC setter, but do not see how
>>> this
>>> would help with selecting the current subsong.
>> GstTocSetter is for writing ToCs when writing files, I don't think it's
>> what you need.
>>
>> I think you have two options:
>>
>> 1) you can register a new GstFormat called "track" and do a seek in
>> track format then. This is similar to what we used to do before we had
>> TOC support in GStreamer (for audio cds, dvd sources had title and
>> chapter formats)
>>
>> 2) make your element advertise tracks/subsongs via GstToc. The
>> application can then select the desired track/subsong by sending a
>> TOC_SELECT event to the pipeline/your plugin:
>>
>>    gst_event_new_toc_select()
>>
>> I'd go for 2).
>>
>> Cheers
>>   -Tim
>>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list