summaryrefslogtreecommitdiff
path: root/src/encoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoder.cc')
-rw-r--r--src/encoder.cc56
1 files changed, 5 insertions, 51 deletions
diff --git a/src/encoder.cc b/src/encoder.cc
index fd7b8a2..e6cbb92 100644
--- a/src/encoder.cc
+++ b/src/encoder.cc
@@ -25,6 +25,9 @@
*/
/*
* $Log$
+ * Revision 1.24 2005/05/02 10:35:23 deva
+ * Fixed wrongly showed snapshot thumbnails.
+ *
* Revision 1.23 2005/05/02 10:18:51 deva
* Preserve network connection when a frozen frame exists, even though no recording is done.
*
@@ -54,12 +57,6 @@
#include "encoder.h"
-#include <time.h>
-
-// Use libdv
-#include <libdv/dv.h>
-#include <libdv/dv_types.h>
-
Encoder::Encoder(Error* err,
const char *gip,
const int gport,
@@ -180,7 +177,7 @@ void Encoder::freeze()
* Set the shoot bit in the network header on the current frame.
* return the decodet (rgba) version af that frame, for thumbnail show.
*/
-void Encoder::shoot(unsigned char *rgb)
+void Encoder::shoot()
{
/*
if(!s) {
@@ -190,7 +187,7 @@ void Encoder::shoot(unsigned char *rgb)
}
*/
// if(!errobj->hasError()) shoot_request = 1 - shoot_request;
- getScreenshot(rgb);
+ // getScreenshot(rgb);
}
@@ -250,47 +247,4 @@ void Encoder::stop(n_savestate save) {
*/
}
-
-void Encoder::getScreenshot(unsigned char *rgb)
-{
- Frame *frame;
-
- unsigned char *pixels[3];
- int pitches[3];
-
- pixels[ 0 ] = rgb;
- pixels[ 1 ] = NULL;
- pixels[ 2 ] = NULL;
-
- pitches[ 0 ] = 720 * 4;
- pitches[ 1 ] = 0;
- pitches[ 2 ] = 0;
-
- dv_decoder_t *decoder = dv_decoder_new(FALSE/*this value is unused*/, FALSE, FALSE);
- decoder->quality = DV_QUALITY_BEST;
-
- frame = queue->peek();
- if(!frame) {
- memset(rgb, 0, sizeof(rgb));
- fprintf(stderr, "Queue is empty\n"); fflush(stderr);
- return;
- }
-
- dv_parse_header(decoder, frame->data);
-
- decoder->system = e_dv_system_625_50; // PAL lines, PAL framerate
- decoder->sampling = e_dv_sample_422; // 4 bytes y, 2 bytes u, 2 bytes v
- decoder->std = e_dv_std_iec_61834;
- decoder->num_dif_seqs = 12;
-
- // libdv img decode to rgb
- dv_decode_full_frame(decoder,
- frame->data,
- e_dv_color_bgr0,
- pixels,
- pitches);
-
- dv_decoder_free(decoder);
-}
-
#endif /*USE_GUI*/