Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - ftype in nowplaying and library table: (5 Items)
   
ftype in nowplaying and library table  
The documentation of the "ftype" column of the "nowplaying" table is referring to the "library" table for details, 
therefore I'd expect that these two columns in the two tables have identical meanings and would have identical values 
when the "fid" in the two tables is identical.

But this does not seems to be the case.

In the following example we are playing back music via A2DP (Bluetooth) from an iPod touch 2G.  The value of "ftype" is 
1 in the "nowplaying" table and 5 in the relevant row (fid=4) of the "library" table.  What is the reason for the 
different values and what is the meaning of the "ftype" column in the two tables?

mme-generic and io-media are 1.2+PSP;  the io-fs-media driver for A2DP is customer implemented.

# qdbc -d mme "select * from nowplaying;"
Rows: 1  Cols: 26
Names:  +ccid+playing+fid+msid+ftype+year+bitrate+samplerate+num_channels+size+discnum+tracknum+rating+copied_fid+
filename+artist+title+album+genre+composer+conductor+soloist+ensemble+opus+category+description+
00000:  |1|0|4|4|1|0|0|0|0|0|0|1234|0|0||Bluetooth: no artist||Bluetooth: no album|Bluetooth: no genre||||||Unknown 
Category||
#
#
# qdbc -d mme "select * from library where fid=4;"
Rows: 1  Cols: 40
Names:  +fid+msid+folderid+ftype+accurate+last_sync+seen+artist_id+album_id+genre_id+year+size+category_id+composer_id+
discnum+titlenum+tracknum+rating+date_added+date_modified+bitrate+audio_index+format+num_channels+language_id+samplerate
+conductor_id+soloist_id+ensemble_id+opus_id+protected+last_played+fullplay_count+duration+copied_fid+playable+permanent
+description+title+filename+
00000:  |4|4|4|5|1|0|1|1|1|1|0|0|1|1|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1|1|0|45096954903|0|0|0|1|0||Bluetooth||
#
#
# qdbc -d mme "select * from mediastores where msid=4;"
Rows: 1  Cols: 19
Names:  +msid+slotid+available+storage_type+trksessionid+lastseen+capabilities+active+location+syncflags+concurrency+
supported+last_sync+metadatapluginid+mssname+name+identifier+driver_identifier+mountpath+
00000:  |4|5|1|12|0|42956957043|2147512279|1||0|1|1|0|0|mediafs2wire|test iPod|SERIAL_123|[NULL]|/fs/avrcp0|
#
#
# qdbc -d mme "select * from trksessionview;"
Rows: 1  Cols: 4
Names:  +sequentialid+fid+trksessionid+randomid+
00000:  |6|4|1|0|
#
Re: ftype in nowplaying and library table  
On Wed, 17 Mar 2010, Mate Szarvas wrote:

>Subject: ftype in nowplaying and library table
>
> The documentation of the "ftype" column of the "nowplaying" table is
> referring to the "library" table for details, therefore I'd expect that these
> two columns in the two tables have identical meanings and would have
> identical values when the "fid" in the two tables is identical.
>
> But this does not seems to be the case.
>
> In the following example we are playing back music via A2DP (Bluetooth) from
> an iPod touch 2G.  The value of "ftype" is 1 in the "nowplaying" table and 5
> in the relevant row (fid=4) of the "library" table.  What is the reason for
> the different values and what is the meaning of the "ftype" column in the two
> tables?
>
> mme-generic and io-media are 1.2+PSP;  the io-fs-media driver for A2DP is
> customer implemented.
>
> # qdbc -d mme "select * from nowplaying;"
> Rows: 1  Cols: 26
> Names:  +ccid+playing+fid+msid+ftype+year+bitrate+samplerate+num_channels+size+discnum+tracknum+rating+copied_fid+
filename+artist+title+album+genre+composer+conductor+soloist+ensemble+opus+category+description+
> 00000:  |1|0|4|4|1|0|0|0|0|0|0|1234|0|0||Bluetooth: no artist||Bluetooth: no album|Bluetooth: no genre||||||Unknown 
Category||
> #
> #
> # qdbc -d mme "select * from library where fid=4;"
> Rows: 1  Cols: 40
> Names:  +fid+msid+folderid+ftype+accurate+last_sync+seen+artist_id+album_id+genre_id+year+size+category_id+composer_id
+discnum+titlenum+tracknum+rating+date_added+date_modified+bitrate+audio_index+format+num_channels+language_id+
samplerate+conductor_id+soloist_id+ensemble_id+opus_id+protected+last_played+fullplay_count+duration+copied_fid+playable
+permanent+description+title+filename+
> 00000:  |4|4|4|5|1|0|1|1|1|1|0|0|1|1|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1|1|0|45096954903|0|0|0|1|0||Bluetooth||
> #
> #
> # qdbc -d mme "select * from mediastores where msid=4;"
> Rows: 1  Cols: 19
> Names:  +msid+slotid+available+storage_type+trksessionid+lastseen+capabilities+active+location+syncflags+concurrency+
supported+last_sync+metadatapluginid+mssname+name+identifier+driver_identifier+mountpath+
> 00000:  |4|5|1|12|0|42956957043|2147512279|1||0|1|1|0|0|mediafs2wire|test iPod|SERIAL_123|[NULL]|/fs/avrcp0|
> #
> #
> # qdbc -d mme "select * from trksessionview;"
> Rows: 1  Cols: 4
> Names:  +sequentialid+fid+trksessionid+randomid+
> 00000:  |6|4|1|0|
> #

Its similar when you're playing from an internet audio stream:

# qdbc -dmme "select * from library where msid=2"
Rows: 1  Cols: 40
Names:  +fid+msid+folderid+ftype+accurate+last_sync+seen+artist_id+album_id+genre_id+year+size+category_id+composer_id+
discnum+titlenum+t
racknum+rating+date_added+date_modified+bitrate+audio_index+format+num_channels+language_id+samplerate+conductor_id+
soloist_id+ensemble_i
d+opus_id+protected+last_played+fullplay_count+duration+copied_fid+playable+permanent+description+title+filename+
00000:  |2|2|2|5|1|0|1|1|1|1|0|0|1|1|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1|1|0|1268815030990739074|0|0|0|1|0||INTERNET||
# qdbc -dmme "select * from mediastores where msid=2"
Rows: 1  Cols: 19
Names:  +msid+slotid+available+storage_type+trksessionid+lastseen+capabilities+active+location+syncflags+concurrency+
supported+last_sync+
metadatapluginid+mssname+name+identifier+driver_identifier+mountpath+
00000:  |2|13|1|22|0|1268753084345026199|2147492096|1||15|1|1|1268753084349025587|0|internet|Internet|/dev/socket|[NULL]
|/dev/socket|
# qdbc -dmme "select fid,msid,ftype from nowplaying"
Rows: 1  Cols: 3
Names:  +fid+msid+ftype+
00000:  |2|2|1|
#

The entry in the library is a device type which would indicate that it is not a
searchable item.  We will only attach and have limited control of it. When we
play from it, we're reporting the ftype of the stream that we're playing
(probably based on...
View Full Message
RE: ftype in nowplaying and library table  
Thank you Peter.

Was hoping to use nowplaying.ftype to tell if playing from a device but
going back to library is also fine.

Just tested what happens when playing video from an iPod (analog video
and sound output).

nowplaying.ftype becomes 3 (FTYPE_AUDIOVIDEO); pretty much makes sense.

--
  Mate

-----Original Message-----
From: Peter Martin [mailto:community-noreply@qnx.com] 
Sent: March 17, 2010 9:41 PM
To: general-multimedia
Subject: Re: ftype in nowplaying and library table

On Wed, 17 Mar 2010, Mate Szarvas wrote:

>Subject: ftype in nowplaying and library table
>
> The documentation of the "ftype" column of the "nowplaying" table is 
> referring to the "library" table for details, therefore I'd expect 
> that these two columns in the two tables have identical meanings and 
> would have identical values when the "fid" in the two tables is
identical.
>
> But this does not seems to be the case.
>
> In the following example we are playing back music via A2DP 
> (Bluetooth) from an iPod touch 2G.  The value of "ftype" is 1 in the 
> "nowplaying" table and 5 in the relevant row (fid=4) of the "library" 
> table.  What is the reason for the different values and what is the 
> meaning of the "ftype" column in the two tables?
>
> mme-generic and io-media are 1.2+PSP;  the io-fs-media driver for A2DP

> is customer implemented.
>
> # qdbc -d mme "select * from nowplaying;"
> Rows: 1  Cols: 26
> Names:  
> +ccid+playing+fid+msid+ftype+year+bitrate+samplerate+num_channels+size
> +discnum+tracknum+rating+copied_fid+filename+artist+title+album+genre+
> composer+conductor+soloist+ensemble+opus+category+description+
> 00000:  |1|0|4|4|1|0|0|0|0|0|0|1234|0|0||Bluetooth: no 
> artist||Bluetooth: no album|Bluetooth: no genre||||||Unknown 
> Category|| # # # qdbc -d mme "select * from library where fid=4;"
> Rows: 1  Cols: 40
> Names:  
> +fid+msid+folderid+ftype+accurate+last_sync+seen+artist_id+album_id+ge
> nre_id+year+size+category_id+composer_id+discnum+titlenum+tracknum+rat
> ing+date_added+date_modified+bitrate+audio_index+format+num_channels+l
> anguage_id+samplerate+conductor_id+soloist_id+ensemble_id+opus_id+prot
> ected+last_played+fullplay_count+duration+copied_fid+playable+permanen
> t+description+title+filename+
> 00000:  
> |4|4|4|5|1|0|1|1|1|1|0|0|1|1|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1|1|0|4509695
> 4903|0|0|0|1|0||Bluetooth||
> #
> #
> # qdbc -d mme "select * from mediastores where msid=4;"
> Rows: 1  Cols: 19
> Names:  
> +msid+slotid+available+storage_type+trksessionid+lastseen+capabilities
> +active+location+syncflags+concurrency+supported+last_sync+metadataplu
> ginid+mssname+name+identifier+driver_identifier+mountpath+
> 00000:  
> |4|5|1|12|0|42956957043|2147512279|1||0|1|1|0|0|mediafs2wire|test 
> iPod|SERIAL_123|[NULL]|/fs/avrcp0|
> #
> #
> # qdbc -d mme "select * from trksessionview;"
> Rows: 1  Cols: 4
> Names:  +sequentialid+fid+trksessionid+randomid+
> 00000:  |6|4|1|0|
> #

Its similar when you're playing from an internet audio stream:

# qdbc -dmme "select * from library where msid=2"
Rows: 1  Cols: 40
Names:
+fid+msid+folderid+ftype+accurate+last_sync+seen+artist_id+album_id+genr
e_id+year+size+category_id+composer_id+discnum+titlenum+t
racknum+rating+date_added+date_modified+bitrate+audio_index+format+num_c
racknum+rating+hannels+language_id+samplerate+conductor_id+soloist_id+en
racknum+rating+semble_i
d+opus_id+protected+last_played+fullplay_count+duration+copied_fid+playa
d+ble+permanent+description+title+filename+
00000:
|2|2|2|5|1|0|1|1|1|1|0|0|1|1|0|0|0|0|0|0|0|0|0|0|1|0|1|1|1|1|0|126881503
0990739074|0|0|0|1|0||INTERNET||
# qdbc -dmme "select * from mediastores where msid=2"
Rows: 1  Cols:...
View Full Message
Re: ftype in nowplaying and library table  
As part of the IOM_EV_METADATA handler 
(mme/lib/ccserver.c::handle_iom_ev_metadata()) 
updatenowplaying_metadata() is called.  So when io-media indicates that 
it has metadata for the current track the MME updates the nowplaying 
using that metadata information.

If you look at services/mme/lib/md_convert.c you can see the legacy 
metadata structure is built from the io-media trackinfo structure; 
included in the legacy metadata structure is ftype.  That's where this 
is coming from.

-- 
Ryan J. Allen
QNX Software Systems
RE: ftype in nowplaying and library table  
Thanks Ryan! 

--
  Mate

-----Original Message-----
From: Ryan Allen [mailto:community-noreply@qnx.com] 
Sent: March 19, 2010 6:12 AM
To: general-multimedia
Subject: Re: ftype in nowplaying and library table

As part of the IOM_EV_METADATA handler
(mme/lib/ccserver.c::handle_iom_ev_metadata())
updatenowplaying_metadata() is called.  So when io-media indicates that
it has metadata for the current track the MME updates the nowplaying
using that metadata information.

If you look at services/mme/lib/md_convert.c you can see the legacy
metadata structure is built from the io-media trackinfo structure;
included in the legacy metadata structure is ftype.  That's where this
is coming from.

--
Ryan J. Allen
QNX Software Systems




_______________________________________________

General
http://community.qnx.com/sf/go/post49957