mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Get rid of the gst_element_info() and replace it with g_message()
Original commit message from CVS: Get rid of the gst_element_info() and replace it with g_message()
This commit is contained in:
parent
964b30886e
commit
1cf253d075
4 changed files with 12 additions and 18 deletions
|
@ -83,7 +83,7 @@ gst_v4l_open (GstV4lElement *v4lelement)
|
|||
v4lelement->videodev = g_strdup("/dev/video");
|
||||
|
||||
/* open the device */
|
||||
v4lelement->video_fd = open(v4lelement->videodev, O_RDONLY);
|
||||
v4lelement->video_fd = open(v4lelement->videodev, O_RDWR);
|
||||
if (!GST_V4L_IS_OPEN(v4lelement))
|
||||
{
|
||||
gst_element_error(GST_ELEMENT(v4lelement),
|
||||
|
@ -100,8 +100,7 @@ gst_v4l_open (GstV4lElement *v4lelement)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gst_element_info(GST_ELEMENT(v4lelement),
|
||||
"Opened device \'%s\' (\'%s\') successfully",
|
||||
g_message("Opened device \'%s\' (\'%s\') successfully\n",
|
||||
v4lelement->vcap.name, v4lelement->videodev);
|
||||
|
||||
return TRUE;
|
||||
|
|
|
@ -99,8 +99,9 @@ gst_v4lmjpegsink_sync_thread (void *arg)
|
|||
}
|
||||
|
||||
end:
|
||||
gst_element_info(GST_ELEMENT(v4lmjpegsink),
|
||||
"Sync thread got signalled to exit");
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Sync thread got signalled to exit\n");
|
||||
#endif
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
|
@ -362,8 +363,7 @@ gst_v4lmjpegsink_playback_init (GstV4lMjpegSink *v4lmjpegsink)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gst_element_info(GST_ELEMENT(v4lmjpegsink),
|
||||
"Got %ld buffers of size %ld KB",
|
||||
g_message("Got %ld buffers of size %ld KB\n",
|
||||
v4lmjpegsink->breq.count, v4lmjpegsink->breq.size/1024);
|
||||
|
||||
/* Map the buffers */
|
||||
|
|
|
@ -120,8 +120,7 @@ gst_v4lmjpegsrc_set_input_norm (GstV4lMjpegSrc *v4lmjpegsrc,
|
|||
|
||||
for (n=V4L_MJPEG_INPUT_COMPOSITE;n<V4L_MJPEG_INPUT_AUTO;n++)
|
||||
{
|
||||
gst_element_info(GST_ELEMENT(v4lmjpegsrc),
|
||||
"Trying %s as input...",
|
||||
g_message("Trying %s as input...\n",
|
||||
input_name[n]);
|
||||
bstat.input = n;
|
||||
|
||||
|
@ -138,8 +137,7 @@ gst_v4lmjpegsrc_set_input_norm (GstV4lMjpegSrc *v4lmjpegsrc,
|
|||
input = bstat.input;
|
||||
if (norm == VIDEO_MODE_AUTO)
|
||||
norm = bstat.norm;
|
||||
gst_element_info(GST_ELEMENT(v4lmjpegsrc),
|
||||
"Signal found: on input %s, norm %s",
|
||||
g_message("Signal found: on input %s, norm %s\n",
|
||||
input_name[bstat.input], norm_name[bstat.norm]);
|
||||
break;
|
||||
}
|
||||
|
@ -172,8 +170,7 @@ gst_v4lmjpegsrc_set_input_norm (GstV4lMjpegSrc *v4lmjpegsrc,
|
|||
if (bstat.signal)
|
||||
{
|
||||
norm = bstat.norm;
|
||||
gst_element_info(GST_ELEMENT(v4lmjpegsrc),
|
||||
"Norm %s detected on input %s",
|
||||
g_message("Norm %s detected on input %s\n",
|
||||
norm_name[bstat.norm], input_name[input]);
|
||||
GST_V4LELEMENT(v4lmjpegsrc)->norm = norm;
|
||||
}
|
||||
|
@ -438,8 +435,7 @@ gst_v4lmjpegsrc_capture_init (GstV4lMjpegSrc *v4lmjpegsrc)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gst_element_info(GST_ELEMENT(v4lmjpegsrc),
|
||||
"Got %ld buffers of size %ld KB",
|
||||
g_message("Got %ld buffers of size %ld KB\n",
|
||||
v4lmjpegsrc->breq.count, v4lmjpegsrc->breq.size/1024);
|
||||
|
||||
/* Map the buffers */
|
||||
|
|
|
@ -292,8 +292,7 @@ gst_v4lsrc_capture_init (GstV4lSrc *v4lsrc)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gst_element_info(GST_ELEMENT(v4lsrc),
|
||||
"Got %d buffers (\'%s\') of size %d KB",
|
||||
g_message("Got %d buffers (\'%s\') of size %d KB\n",
|
||||
v4lsrc->mbuf.frames, palette_name[v4lsrc->mmap.format],
|
||||
v4lsrc->mbuf.size/(v4lsrc->mbuf.frames*1024));
|
||||
|
||||
|
@ -347,7 +346,7 @@ gst_v4lsrc_capture_init (GstV4lSrc *v4lsrc)
|
|||
|
||||
/* Map the buffers */
|
||||
GST_V4LELEMENT(v4lsrc)->buffer = mmap(0, v4lsrc->mbuf.size,
|
||||
PROT_READ, MAP_SHARED, GST_V4LELEMENT(v4lsrc)->video_fd, 0);
|
||||
PROT_READ|PROT_WRITE, MAP_SHARED, GST_V4LELEMENT(v4lsrc)->video_fd, 0);
|
||||
if (GST_V4LELEMENT(v4lsrc)->buffer == MAP_FAILED)
|
||||
{
|
||||
gst_element_error(GST_ELEMENT(v4lsrc),
|
||||
|
|
Loading…
Reference in a new issue