Skip to content

Commit b98cdb7

Browse files
committed
ofGstUtils fixed broken define if
1 parent 6def95e commit b98cdb7

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

libs/openFrameworks/video/ofGstUtils.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -290,36 +290,36 @@ bool ofGstUtils::startPipeline(){
290290
ofLogVerbose() << "Pipeline is PREROLLED";
291291
break;
292292
}
293-
293+
294294
if(isAppSink){
295295
ofLogVerbose("ofGstUtils") << "startPipeline(): attaching callbacks";
296296

297297
bool bSignals = false;
298-
298+
299299
#if GST_VERSION_MAJOR==0
300300

301301
GstAppSinkCallbacks gstCallbacks;
302302
gstCallbacks.eos = &on_eos_from_source;
303303
gstCallbacks.new_preroll = &on_new_preroll_from_source;
304304
gstCallbacks.new_buffer = &on_new_buffer_from_source;
305305
gst_app_sink_set_callbacks(GST_APP_SINK(gstSink), &gstCallbacks, this, NULL);
306-
307-
#elseif GST_VERSION_MINOR <= 18
306+
307+
#elif GST_VERSION_MINOR <= 18
308308

309309
GstAppSinkCallbacks gstCallbacks;
310310
gstCallbacks.eos = &on_eos_from_source;
311311
gstCallbacks.new_preroll = &on_new_preroll_from_source;
312312
gstCallbacks.new_sample = &on_new_buffer_from_source;
313313
gst_app_sink_set_callbacks(GST_APP_SINK(gstSink), &gstCallbacks, this, NULL);
314-
314+
315315
#else
316316

317317
//GStreamer 1.20 onwards crashes with the callback approach above.
318318
//Using signals makes it work! This might be a GStreamer bug - but we'll do this for now
319319
g_signal_connect(GST_APP_SINK(gstSink), "eos", G_CALLBACK(on_eos_from_source), this);
320320
g_signal_connect(GST_APP_SINK(gstSink), "new-sample", G_CALLBACK(on_new_buffer_from_source), this);
321321
g_signal_connect(GST_APP_SINK(gstSink), "new-preroll", G_CALLBACK(on_new_preroll_from_source), this);
322-
322+
323323
bSignals = true;
324324
#endif
325325

@@ -330,7 +330,7 @@ bool ofGstUtils::startPipeline(){
330330
gst_app_sink_set_max_buffers(GST_APP_SINK(gstSink),3);
331331
gst_app_sink_set_drop (GST_APP_SINK(gstSink),true);
332332
}
333-
333+
334334
// wait for paused state to query the duration
335335
if(!isStream){
336336
bPlaying = true;
@@ -518,7 +518,7 @@ void ofGstUtils::setSpeed(float _speed){
518518
needPos = false;
519519
}
520520
#endif
521-
521+
522522
if(_speed > 1 || _speed < -1){
523523
flags = (GstSeekFlags)(flags | GST_SEEK_FLAG_SKIP);
524524
}
@@ -527,7 +527,7 @@ void ofGstUtils::setSpeed(float _speed){
527527
gst_element_set_state (gstPipeline, GST_STATE_PAUSED);
528528
return;
529529
}
530-
530+
531531

532532
gint64 pos = 0;
533533
GstSeekType seekType = GST_SEEK_TYPE_NONE;
@@ -770,7 +770,7 @@ bool ofGstUtils::gstHandleMessage(GstBus * bus, GstMessage * msg){
770770
g_free (name);
771771
break;
772772
}
773-
773+
774774
#if GST_VERSION_MAJOR==1 && GST_VERSION_MINOR>=2
775775
case GST_MESSAGE_HAVE_CONTEXT:{
776776
GstContext *context;
@@ -874,7 +874,7 @@ void ofGstVideoUtils::close(){
874874
bBackPixelsChanged = false;
875875
frontBuffer.reset();
876876
backBuffer.reset();
877-
877+
878878
#if GST_VERSION_MAJOR==1
879879
while(!bufferQueue.empty()) bufferQueue.pop();
880880
#endif

0 commit comments

Comments
 (0)