Using GST_TAG_TRACK_NUMBER for selecting tracks / subsongs?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using GST_TAG_TRACK_NUMBER for selecting tracks / subsongs?

Carlos Rafael Giani
Hello,

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.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Using GST_TAG_TRACK_NUMBER for selecting tracks / subsongs?

Tim Müller
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

--
Tim Müller, Centricular Ltd - http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Using GST_TAG_TRACK_NUMBER for selecting tracks / subsongs?

Carlos Rafael Giani
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).

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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Using GST_TAG_TRACK_NUMBER for selecting tracks / subsongs?

Stefan Sauer
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
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel