Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INSERT thiblahute ~ Downloads gstreamer-playground ges-slide-composition git diff master
- diff --git a/ges-slide-composition/main.cpp b/ges-slide-composition/main.cpp
- index 29015bd..4d8d1e5 100644
- --- a/ges-slide-composition/main.cpp
- +++ b/ges-slide-composition/main.cpp
- @@ -5,9 +5,9 @@
- #define INCLUDE_FOREGROUND_VIDEO true
- -int64_t __cdecl cbQueryPosition(GstElement* nleComposition, GstPipeline* gstPipeline);
- +int64_t cbQueryPosition(GstElement* nleComposition, GstPipeline* gstPipeline);
- GstElement* getNleCompositionElement(GESTrack* gesTrack);
- -bool __cdecl setInt(GESTrackElement* trackElement, const char* name, int32_t value);
- +bool setInt(GESTrackElement* trackElement, const char* name, int32_t value);
- int main(int nargs, char** args)
- {
- @@ -19,9 +19,9 @@ int main(int nargs, char** args)
- uint64_t durationTimeline = numSlides * durationPerSlide;
- int32_t canvasHeight = 1080;
- int32_t canvasWidth = 1920;
- -
- +
- // This is where the media files are held (relative to executable).
- - std::string collateralFolder = "../../collateral/";
- + std::string collateralFolder = "../collateral/";
- //std::string collateralFolder = "C:/tmp/collateral/";
- // --------------------
- @@ -104,7 +104,7 @@ int main(int nargs, char** args)
- GST_ERROR("Failed to add clip to slide layer, uri=%s", uri);
- return 1;
- }
- -
- +
- // time projection
- ges_timeline_element_set_start((GESTimelineElement*)(clip), iSlide*durationPerSlide);
- ges_timeline_element_set_duration((GESTimelineElement*)(clip), durationPerSlide);
- @@ -227,7 +227,7 @@ int main(int nargs, char** args)
- // -------------------
- // Run the pipeline
- // -------------------
- - bool loopShouldTerminate = false;
- + bool loopShouldTerminate = false;
- // Change the state asynchronously.
- gst_element_set_state((GstElement*)gstPipeline, GST_STATE_PLAYING);
- @@ -241,7 +241,7 @@ int main(int nargs, char** args)
- GST_ERROR("Pipeline state should be PLAYING. It is %s.", gst_element_state_get_name(currentState));
- gst_element_set_state((GstElement*)gstPipeline, GST_STATE_NULL);
- gst_element_get_state((GstElement*)gstPipeline, ¤tState, &pendingState, 10 * GST_SECOND);
- -
- +
- GST_INFO("Pipeline stopped");
- return 1;
- }
- @@ -252,6 +252,8 @@ int main(int nargs, char** args)
- int output = 0;
- // Main loop
- + ges_timeline_save_to_uri (gesTimeline, "file:///home/thiblahute/test.xges",
- + NULL, TRUE, NULL);
- gstBus = gst_element_get_bus((GstElement*)gstPipeline);
- while (!loopShouldTerminate)
- {
- @@ -351,7 +353,7 @@ int main(int nargs, char** args)
- #pragma warning( push )
- #pragma warning( disable:4100 ) // formal parameters are not referenced in the method below.
- -int64_t __cdecl cbQueryPosition(GstElement* nleComposition, GstPipeline* gstPipeline)
- +int64_t cbQueryPosition(GstElement* nleComposition, GstPipeline* gstPipeline)
- {
- int64_t position;
- @@ -388,7 +390,7 @@ GstElement* getNleCompositionElement(GESTrack* gesTrack)
- {
- elementFactoryName = gst_object_get_name(reinterpret_cast<GstObject*>(gstElementFactory));
- //if (boost::iequals(factoryName, elementFactoryName))
- - if(0==std::strcmp("nlecomposition", elementFactoryName))
- + if(!g_strcmp0("nlecomposition", elementFactoryName))
- {
- output = gstElement;
- done = true;
- @@ -409,10 +411,10 @@ GstElement* getNleCompositionElement(GESTrack* gesTrack)
- return output;
- }
- -bool __cdecl setInt(GESTrackElement* trackElement, const char* name, int32_t value)
- +bool setInt(GESTrackElement* trackElement, const char* name, int32_t value)
- {
- bool output = true;
- -
- +
- GValue val = G_VALUE_INIT;
- g_value_init(&val, G_TYPE_INT);
- @@ -423,4 +425,4 @@ bool __cdecl setInt(GESTrackElement* trackElement, const char* name, int32_t val
- output = false;
- }
- return output;
- -}
- \ No newline at end of file
- +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement