mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
Merge pull request #11358 from mshabunin:enable-xine
This commit is contained in:
commit
9615f8c994
@ -116,7 +116,8 @@ enum VideoCaptureAPIs {
|
|||||||
CAP_IMAGES = 2000, //!< OpenCV Image Sequence (e.g. img_%02d.jpg)
|
CAP_IMAGES = 2000, //!< OpenCV Image Sequence (e.g. img_%02d.jpg)
|
||||||
CAP_ARAVIS = 2100, //!< Aravis SDK
|
CAP_ARAVIS = 2100, //!< Aravis SDK
|
||||||
CAP_OPENCV_MJPEG = 2200, //!< Built-in OpenCV MotionJPEG codec
|
CAP_OPENCV_MJPEG = 2200, //!< Built-in OpenCV MotionJPEG codec
|
||||||
CAP_INTEL_MFX = 2300 //!< Intel MediaSDK
|
CAP_INTEL_MFX = 2300, //!< Intel MediaSDK
|
||||||
|
CAP_XINE = 2400, //!< XINE engine (Linux)
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief %VideoCapture generic properties identifier.
|
/** @brief %VideoCapture generic properties identifier.
|
||||||
|
@ -318,15 +318,11 @@ CV_IMPL CvCapture * cvCreateFileCaptureWithPreference (const char * filename, in
|
|||||||
if (apiPreference) break;
|
if (apiPreference) break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case CAP_MSMF:
|
|
||||||
#ifdef HAVE_MSMF
|
#ifdef HAVE_MSMF
|
||||||
|
case CAP_MSMF:
|
||||||
TRY_OPEN(result, cvCreateFileCapture_MSMF (filename))
|
TRY_OPEN(result, cvCreateFileCapture_MSMF (filename))
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_XINE
|
|
||||||
TRY_OPEN(result, cvCreateFileCapture_XINE (filename))
|
|
||||||
#endif
|
|
||||||
if (apiPreference) break;
|
if (apiPreference) break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_VFW
|
#ifdef HAVE_VFW
|
||||||
case CAP_VFW:
|
case CAP_VFW:
|
||||||
@ -540,6 +536,14 @@ static Ptr<IVideoCapture> IVideoCapture_create(const String& filename, int apiPr
|
|||||||
{
|
{
|
||||||
bool useAny = (apiPreference == CAP_ANY);
|
bool useAny = (apiPreference == CAP_ANY);
|
||||||
Ptr<IVideoCapture> capture;
|
Ptr<IVideoCapture> capture;
|
||||||
|
#ifdef HAVE_XINE
|
||||||
|
if (useAny || apiPreference == CAP_XINE)
|
||||||
|
{
|
||||||
|
capture = createXINECapture(filename.c_str());
|
||||||
|
if (capture && capture->isOpened())
|
||||||
|
return capture;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#ifdef HAVE_GPHOTO2
|
#ifdef HAVE_GPHOTO2
|
||||||
if (useAny || apiPreference == CAP_GPHOTO2)
|
if (useAny || apiPreference == CAP_GPHOTO2)
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -133,8 +133,6 @@ CvCapture* cvCreateCameraCapture_Aravis( int index );
|
|||||||
CvCapture* cvCreateFileCapture_Images(const char* filename);
|
CvCapture* cvCreateFileCapture_Images(const char* filename);
|
||||||
CvVideoWriter* cvCreateVideoWriter_Images(const char* filename);
|
CvVideoWriter* cvCreateVideoWriter_Images(const char* filename);
|
||||||
|
|
||||||
CvCapture* cvCreateFileCapture_XINE (const char* filename);
|
|
||||||
|
|
||||||
|
|
||||||
#define CV_CAP_GSTREAMER_1394 0
|
#define CV_CAP_GSTREAMER_1394 0
|
||||||
#define CV_CAP_GSTREAMER_V4L 1
|
#define CV_CAP_GSTREAMER_V4L 1
|
||||||
@ -195,6 +193,8 @@ namespace cv
|
|||||||
|
|
||||||
Ptr<IVideoCapture> createGPhoto2Capture(int index);
|
Ptr<IVideoCapture> createGPhoto2Capture(int index);
|
||||||
Ptr<IVideoCapture> createGPhoto2Capture(const String& deviceName);
|
Ptr<IVideoCapture> createGPhoto2Capture(const String& deviceName);
|
||||||
|
|
||||||
|
Ptr<IVideoCapture> createXINECapture(const char* filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __VIDEOIO_H_ */
|
#endif /* __VIDEOIO_H_ */
|
||||||
|
@ -131,7 +131,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ext != "wmv")
|
if (ext != "wmv" && ext != "h264" && ext != "h265")
|
||||||
{
|
{
|
||||||
SCOPED_TRACE("progressive seek");
|
SCOPED_TRACE("progressive seek");
|
||||||
ASSERT_TRUE(cap.set(CAP_PROP_POS_FRAMES, 0));
|
ASSERT_TRUE(cap.set(CAP_PROP_POS_FRAMES, 0));
|
||||||
@ -141,7 +141,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ext != "mpg" && ext != "wmv")
|
if (ext != "mpg" && ext != "wmv" && ext != "h264" && ext != "h265")
|
||||||
{
|
{
|
||||||
SCOPED_TRACE("random seek");
|
SCOPED_TRACE("random seek");
|
||||||
ASSERT_TRUE(cap.set(CAP_PROP_POS_FRAMES, 0));
|
ASSERT_TRUE(cap.set(CAP_PROP_POS_FRAMES, 0));
|
||||||
@ -334,6 +334,11 @@ int backend_params[] = {
|
|||||||
#ifdef HAVE_FFMPEG
|
#ifdef HAVE_FFMPEG
|
||||||
CAP_FFMPEG,
|
CAP_FFMPEG,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_XINE
|
||||||
|
CAP_XINE,
|
||||||
|
#endif
|
||||||
|
|
||||||
CAP_OPENCV_MJPEG
|
CAP_OPENCV_MJPEG
|
||||||
// CAP_INTEL_MFX
|
// CAP_INTEL_MFX
|
||||||
};
|
};
|
||||||
@ -345,6 +350,8 @@ string bunny_params[] = {
|
|||||||
string("mp4"),
|
string("mp4"),
|
||||||
string("mpg"),
|
string("mpg"),
|
||||||
string("avi"),
|
string("avi"),
|
||||||
|
string("h264"),
|
||||||
|
string("h265"),
|
||||||
#endif
|
#endif
|
||||||
string("mjpg.avi")
|
string("mjpg.avi")
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user