Add basics for progressive sound asset writing.
[libdcp.git] / src / dcp.cc
index 6c62693954ba4bca297486e928226969fb2006a8..4f1732da3ca2149dec2e5fe2bb637ba9c1e5d7ae 100644 (file)
@@ -361,12 +361,11 @@ CPL::CPL (string directory, string file, shared_ptr<const AssetMap> asset_map, b
                        try {
                                picture.reset (new MonoPictureAsset (
                                                       _directory,
-                                                      asset_map->asset_from_id (p->id)->chunks.front()->path,
-                                                      _fps,
-                                                      (*i)->asset_list->main_picture->entry_point,
-                                                      (*i)->asset_list->main_picture->duration
+                                                      asset_map->asset_from_id (p->id)->chunks.front()->path
                                                       )
                                        );
+
+                               picture->set_entry_point ((*i)->asset_list->main_picture->entry_point);
                        } catch (MXFFileError) {
                                if (require_mxfs) {
                                        throw;
@@ -380,10 +379,12 @@ CPL::CPL (string directory, string file, shared_ptr<const AssetMap> asset_map, b
                                                       _directory,
                                                       asset_map->asset_from_id (p->id)->chunks.front()->path,
                                                       _fps,
-                                                      p->entry_point,
                                                       p->duration
                                                       )
                                        );
+
+                               picture->set_entry_point (p->entry_point);
+                               
                        } catch (MXFFileError) {
                                if (require_mxfs) {
                                        throw;
@@ -397,12 +398,11 @@ CPL::CPL (string directory, string file, shared_ptr<const AssetMap> asset_map, b
                        try {
                                sound.reset (new SoundAsset (
                                                     _directory,
-                                                    asset_map->asset_from_id ((*i)->asset_list->main_sound->id)->chunks.front()->path,
-                                                    _fps,
-                                                    (*i)->asset_list->main_sound->entry_point,
-                                                    (*i)->asset_list->main_sound->duration
+                                                    asset_map->asset_from_id ((*i)->asset_list->main_sound->id)->chunks.front()->path
                                                     )
                                        );
+
+                               sound->set_entry_point ((*i)->asset_list->main_sound->entry_point);
                        } catch (MXFFileError) {
                                if (require_mxfs) {
                                        throw;