[gst-devel] v4l2src fails to change video norm from PAL to NTSC

wally_bkg wb666greene at gmail.com
Tue Dec 7 17:18:53 CET 2010


This worked with v4l2src version 0.10.7 on Ubuntu 8.04, but when I moved to
Ubuntu 10.04 64-bit which has v4l2src version 0.10.21 the norm doesn't
change and the video window displays only an apparently static green screen. 
When I close the video window to exit the program, everything works fine the
next times as the norm is NTSC then.


It seems about half my video cards default to PAL after a restart, so I need
to figure out why this no longer works.

Here is the norm setting code:

gst_element_set_state (pipeline, GST_STATE_PAUSED);
GstTuner *tuner = GST_TUNER( (GstTuner *) source);	// get a pointer to
access the tuner interface
GstTunerNorm *prevNorm=gst_tuner_get_norm(tuner);
g_print("Previous Norm: %s\n", prevNorm->label);

GstTunerNorm *ntsc=gst_tuner_find_norm_by_name (tuner, "NTSC"); // most have
no NTSC-M :(
if(ntsc) goto norm_set;	
ntsc=gst_tuner_find_norm_by_name (tuner, "NTSC-M");	// stupid card, no NTSC
:(	

norm_set:
if(ntsc) gst_tuner_set_norm (tuner, ntsc); else g_error("Can't set
NTSC!\n");
g_print("Current Norm: %s\n\n", ntsc->label);

-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/v4l2src-fails-to-change-video-norm-from-PAL-to-NTSC-tp3076696p3076696.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list