[gst-devel] v4l2src->appsink appsrc->xvimagesink fails to change video norm from PAL to NTSC
wally_bkg
wb666greene at gmail.com
Tue Dec 14 16:52:18 CET 2010
Tim-Philipp Müller-2 wrote:
>
> On Tue, 2010-12-07 at 15:39 -0800, wally_bkg wrote:
>
>> Looks like another undocumented or unintentional change to gstreamer,
>> need to
>> set pipeline to READY instead of PAUSED now before using the interface.
>>
>> Change:
>>
>> gst_element_set_state (pipeline, GST_STATE_PAUSED);
>>
>> To:
>>
>> gst_element_set_state (pipeline, GST_STATE_READY);
>>
>> And the PAL to NTSC switch happens correctly now.
>
> I believe this change (open device when going to READY, not PAUSED) was
> intentional, to align v4l2src with other elements (opening the device in
> the NULL->READY state change), but by itself shouldn't break anything.
> It shouldn't make a difference at the v4l2src level, since the device
> will go to READY state before going to PAUSED state.
>
I've ran into this problem again now that I've split my pipeline into two
pipelines.
v4l2src->appsink
appsrc->xvimagesink
I assumed this issue was closed from the above, but we had a power failure
so my system was reset and of course defaults to PAL on power-up. I was
shocked to find it fail when I ran my code.
wally at wahine:~/gst-learn$ ./VideoPipeline
The v4l2 device is '/dev/video0'.
Previous Norm: PAL
Current Norm: NTSC
Signals will be emitted.
max buffers: 0
drop buffers: FALSE
Reading from appsrc to xvimagesink
Capturing from v4l2src to appsink
isource failed to go into PLAYING state
Main Loop Running...
Error: Could not negotiate format
Returned, stopping playback
Deleting pipelines
but simply running the program again after it terminates works:
wally at wahine:~/gst-learn$ ./VideoPipeline
The v4l2 device is '/dev/video0'.
Previous Norm: NTSC
Current Norm: NTSC
Signals will be emitted.
max buffers: 0
drop buffers: FALSE
Reading from appsrc to xvimagesink
Capturing from v4l2src to appsink
on_new_buffer_from_source Callback entered.
Main Loop Running...
I'm using the appsink-src.c as a guide and don't understand why the v4l2
NORM switch doesn't seem to happen until the program errors and exits now.
My "hello word" video program still works which is just:
v4l2src->xvimagesink
I can recreate the problem by stating XawTV, setting PAL mode and exiting
it, leaving the card back in PAL mode.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/v4l2src-fails-to-change-video-norm-from-PAL-to-NTSC-tp3076696p3087351.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list