[rygel] media-export: Fix bitrate setting for media items
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Fix bitrate setting for media items
- Date: Sat, 24 Jul 2010 00:55:40 +0000 (UTC)
commit 683472240481aecb0c03220cd1d47521f83bdae0
Author: Jens Georg <mail jensge org>
Date: Fri Jul 23 22:44:12 2010 +0300
media-export: Fix bitrate setting for media items
- Set bitrate for audio items.
- Bitrate is always for audio, even in video files.
.../media-export/rygel-media-export-item.vala | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-item.vala b/src/plugins/media-export/rygel-media-export-item.vala
index 6248855..e99be19 100644
--- a/src/plugins/media-export/rygel-media-export-item.vala
+++ b/src/plugins/media-export/rygel-media-export-item.vala
@@ -134,16 +134,15 @@ public class Rygel.MediaExport.Item : Rygel.MediaItem {
this.height = (int) video_info.height;
this.color_depth = (int) video_info.depth;
- if (video_info.tags != null) {
- uint tmp;
-
- video_info.tags.get_uint (TAG_BITRATE, out tmp);
- this.bitrate = (int) tmp / 8;
- }
-
if (audio_info != null) {
this.n_audio_channels = (int) audio_info.channels;
this.sample_freq = (int) audio_info.sample_rate;
+ if (audio_info.tags != null) {
+ uint tmp;
+
+ audio_info.tags.get_uint (TAG_BITRATE, out tmp);
+ this.bitrate = (int) tmp / 8;
+ }
}
}
@@ -186,6 +185,12 @@ public class Rygel.MediaExport.Item : Rygel.MediaItem {
mtime,
MediaItem.MUSIC_CLASS);
+ if (audio_info.tags != null) {
+ uint tmp;
+
+ audio_info.tags.get_uint (TAG_BITRATE, out tmp);
+ this.bitrate = (int) tmp / 8;
+ }
this.n_audio_channels = (int) audio_info.channels;
this.sample_freq = (int) audio_info.sample_rate;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]