[brasero] Properly load video project
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Subject: [brasero] Properly load video project
- Date: Fri, 3 Jul 2009 13:13:20 +0000 (UTC)
commit db0a91bcb79b4c7744d3273045b15413e4f032b4
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Fri Jul 3 13:56:15 2009 +0200
Properly load video project
Since when we load a project a BraseroTrackStream has no format yet, set a fake video one that will be overriden after the proper sniffing of the format
src/brasero-project-parse.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/brasero-project-parse.c b/src/brasero-project-parse.c
index 4124294..e197fc8 100644
--- a/src/brasero-project-parse.c
+++ b/src/brasero-project-parse.c
@@ -191,7 +191,8 @@ error:
static BraseroTrack *
_read_audio_track (xmlDocPtr project,
- xmlNodePtr uris)
+ xmlNodePtr uris,
+ gboolean is_video)
{
BraseroTrackStreamCfg *track;
@@ -212,6 +213,13 @@ _read_audio_track (xmlDocPtr project,
g_free (uri);
brasero_track_stream_set_source (BRASERO_TRACK_STREAM (track), unescaped_uri);
+
+ /* For the moment pretend it is a video file. Since it is BraseroTrackStreamCfg, that
+ * will be set properly afterwards. */
+ if (is_video)
+ brasero_track_stream_set_format (BRASERO_TRACK_STREAM (track),
+ BRASERO_VIDEO_FORMAT_UNDEFINED);
+
g_free (unescaped_uri);
}
else if (!xmlStrcmp (uris->name, (const xmlChar *) "silence")) {
@@ -360,7 +368,7 @@ _get_tracks (xmlDocPtr project,
BraseroTrack *newtrack;
if (!xmlStrcmp (track_node->name, (const xmlChar *) "audio")) {
- newtrack = _read_audio_track (project, track_node->xmlChildrenNode);
+ newtrack = _read_audio_track (project, track_node->xmlChildrenNode, FALSE);
if (!newtrack)
goto error;
@@ -375,7 +383,7 @@ _get_tracks (xmlDocPtr project,
tracks = g_slist_append (tracks, newtrack);
}
else if (!xmlStrcmp (track_node->name, (const xmlChar *) "video")) {
- newtrack = _read_audio_track (project, track_node->xmlChildrenNode);
+ newtrack = _read_audio_track (project, track_node->xmlChildrenNode, TRUE);
if (!newtrack)
goto error;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]