summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--Makefile4
-rw-r--r--dxr3device.c65
-rw-r--r--dxr3device.h2
4 files changed, 4 insertions, 69 deletions
diff --git a/HISTORY b/HISTORY
index ab2fa1c..4a30102 100644
--- a/HISTORY
+++ b/HISTORY
@@ -304,3 +304,5 @@ NOTE: I havent found time to include all of the languages, will be done in pre2
- sync default microcode location with em8300 0.15.2+ (Ville Skyttä)
- improve device reset and error recovery, try to preserve aspect ratio and
audio mode etc (Luca Olivetti, Ville Skyttä)
+- remove image grab code, it's broken (crashes vdr) and would cause
+ maintenance problems with various 1.3.x vdr versions (Ville Skyttä)
diff --git a/Makefile b/Makefile
index 4e9be8e..1dd6fbd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile,v 1.1.2.20 2005/11/22 10:55:55 scop Exp $
+# $Id: Makefile,v 1.1.2.21 2006/01/08 17:58:34 scop Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -43,7 +43,7 @@ PACKAGE = $(shell echo vdr-$(ARCHIVE) | sed -e 's/cvs$$/cvs'`date +%Y%m%d`/)
### Includes and Defines (add further entries here):
INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include -I$(FFMDIR) -I$(EM8300)
-LIBS = -L$(FFMDIR)/libavcodec -lavcodec -ljpeg
+LIBS = -L$(FFMDIR)/libavcodec -lavcodec
DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
DEFINES += -D_GNU_SOURCE
diff --git a/dxr3device.c b/dxr3device.c
index eda81fc..7981ddb 100644
--- a/dxr3device.c
+++ b/dxr3device.c
@@ -360,71 +360,6 @@ void cDxr3Device::PlayAudio(const uchar *Data, int Length)
}
// addition functions
-// ==================================
-//! capture a single frame as an image
-bool cDxr3Device::GrabImage(const char *FileName, bool Jpeg, int Quality,
- int SizeX, int SizeY)
-{
- int w = SizeX;
- int h = SizeY;
- unsigned char *Data = new unsigned char[w * h * 3];
- memset(Data, 0, w * h * 3);
-
- // we could get a I-Frame and save it
- //m_DemuxDevice.StillPicture(Data, 100 * 1024);
-
- isyslog("grabbing to %s (%s %d %d %d)",
- FileName, Jpeg ? "JPEG" : "PNM", Quality, w, h);
- FILE *f = fopen(FileName, "wb");
- if (f)
- {
- if (Jpeg)
- {
- ///< write JPEG file:
- struct jpeg_compress_struct cinfo;
- struct jpeg_error_mgr jerr;
- cinfo.err = jpeg_std_error(&jerr);
- jpeg_create_compress(&cinfo);
- jpeg_stdio_dest(&cinfo, f);
- cinfo.image_width = w;
- cinfo.image_height = h;
- cinfo.input_components = 3;
- cinfo.in_color_space = JCS_RGB;
-
- jpeg_set_defaults(&cinfo);
- jpeg_set_quality(&cinfo, Quality, true);
- jpeg_start_compress(&cinfo, true);
-
- int rs = w * 3;
- JSAMPROW rp[h];
- for (int k = 0; k < h; k++)
- {
- rp[k] = &Data[rs * k];
- }
- jpeg_write_scanlines(&cinfo, rp, h);
- jpeg_finish_compress(&cinfo);
- jpeg_destroy_compress(&cinfo);
-
- }
- else
- {
- ///< write PNM file:
- if (fprintf(f, "P6\n%d\n%d\n255\n", w, h) < 0 ||
- fwrite(Data, w * h * 3, 1, f) != 1)
- {
- LOG_ERROR_STR(FileName);
- }
- }
- fclose(f);
- }
- else
- {
- return false;
- }
-
- delete Data;
- return true;
-}
// ==================================
void cDxr3Device::SetVideoFormat(bool VideoFormat16_9)
diff --git a/dxr3device.h b/dxr3device.h
index ca11ba6..333ad1f 100644
--- a/dxr3device.h
+++ b/dxr3device.h
@@ -63,8 +63,6 @@ public:
#endif
// addition functions
- virtual bool GrabImage(const char *FileName, bool Jpeg = true,
- int Quality = -1, int SizeX = -1, int SizeY = -1);
virtual void SetVideoFormat(bool VideoFormat16_9);
virtual void SetVolumeDevice(int Volume);
virtual void SetAudioChannelDevice(int AudioChannel);