AZbox HD - vyvoj

Nastavení a vše kolem Azboxu HD.

Moderátoři: gorick, schmegea, monkus

Odpovědět
Uživatelský avatar
grantec
Administrátor
Administrátor
Příspěvky: 5634
Registrován: 14 led 2009, 21:26
Bydliště: Slovensko
Dostal poděkování: 2 poděkování
Kontaktovat uživatele:

AZbox HD - vyvoj

Příspěvek od grantec »

Driver rt2870 azbox
Driver rt2870 azbox.rar

Kód: Vybrat vše

smp8634_documentation
smp86xx_bootloader_2.8.4.1
SMP863X_Memory_Design_1
smp86xx_kernel_source_2.8.2.0_dev-mips
smp86xx_rootfs
:arrow: http://www.megaupload.com/?d=JANWTAKY
2cf7iao.jpg
:arrow: http://www.megaupload.com/?d=G2GUKODU

Kto si chce extrahovat patch.bin a prezriet jeho subory:
dd if=patch.bin skip=1 bs=56 > patch_cramfs.bin
mount -o loop patch_cramfs.bin dir/
Nemáte oprávnění prohlížet přiložené soubory.


Zapol som si surflock ! Max 1sz za 24 hod ! A0 00
Uživatelský avatar
grantec
Administrátor
Administrátor
Příspěvky: 5634
Registrován: 14 led 2009, 21:26
Bydliště: Slovensko
Dostal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: AZbox HD - vyvoj

Příspěvek od grantec »



Zapol som si surflock ! Max 1sz za 24 hod ! A0 00
Uživatelský avatar
grantec
Administrátor
Administrátor
Příspěvky: 5634
Registrován: 14 led 2009, 21:26
Bydliště: Slovensko
Dostal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: AZbox HD - vyvoj

Příspěvek od grantec »

este upresnim extrahovanie:
dd if=patch.bin of=header.bin bs=40 count=1
dd if=patch.bin of=md5sum.bin bs=8 skip=5 count=2
dd if=patch.bin of=patch.cramfs.bin bs=56 skip=1

cramfsck -x patch.cramfs.bin /dir
extrahuje CramFS a uvidíte celú štruktúru adresara CramFS.


Zapol som si surflock ! Max 1sz za 24 hod ! A0 00
Uživatelský avatar
grantec
Administrátor
Administrátor
Příspěvky: 5634
Registrován: 14 led 2009, 21:26
Bydliště: Slovensko
Dostal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: AZbox HD - vyvoj

Příspěvek od grantec »

Google 1.1 source code for AZbox HD

Kód: Vybrat vše

/*
 * Nano-X GrGrabKey() demo program.
 *
 * Copyright(C) 2003 Jon Foster < - Email Address Removed for Security ->
 * Based on demo2.c
 *
 * This program allows the GrGrabKey() API to be tested.
 * It creates a window, and displays key and hotkey events it recieves
 * in that window.  At startup it registers a key with GrGrabKey().
 * The key and the registration type can both be specified on the
 * command line.
 *
 * Usage:
 *    grabdemo key {n|h|x|s}
 * Key is numerical MWKEY value (default 55='a').
 * The second parameter is a single letter indicating the reservation
 * type.  Valid values:
 *   n - Normal    (GR_GRAB_HOTKEY_EXCLUSIVE) (default)
 *   h - Hotkey    (GR_GRAB_HOTKEY)
 *   x - eXclusive (GR_GRAB_EXCLUSIVE)
 *   m - Mouse     (GR_GRAB_EXCLUSIVE_MOUSE)
 */

#define MWINCLUDECOLORS
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include </root/microwin/src/include/nano-X.h>
#include <signal.h>
#include <string.h>
#include <stdio.h>
#include <curl/curl.h>
#include <curl/types.h>
#include <curl/easy.h>

/*#include <time.h> //Zamanlayıcı için*/


static GR_WINDOW_ID	main_window;
static GR_GC_ID		main_gc;
static char	message1[100] = "--- Google Map --- Beta V1.1 By AzDev";
//char message2[100][300] ;

int kartim;
#define WIDTH	640
#define HEIGHT	480   //CİZİM ALANI BELİRLE



//char server[1000][200];
//int uzunluk[1000];
//char Baslik[1000][200];
//char Url[1000][200];
//static int Toplam,Toplam2;
static  int restat,Goruntu;
static void draw_menu_key();
int k,adim,kartim2,rkont,zoom,uzunluk[100];
double xcord,ycord,artis;
char Baslik[100][255],server[100][255],Url[100][255],ZooM[100][255],CarpaN[100][255];
//map
int menuatla,renkli,carpan;
char *bmpServer,*isim;
char  Url3[500],*secim;
char hata[250];
/// Eklenti resim
//#define FONTNAME   "Font1.ttf"
#define FILE_IMAGE "/root/workspace/GoogleMap/image"

#define FONTNAME   "/MMP/hd/System/font/Font1.ttf"
//#define FILE_IMAGE "/EMU/GoogleMap/image"
#ifndef	FALSE
#define	FALSE	(0)
#endif

#ifndef	TRUE
#define	TRUE	(!FALSE)
#endif
static GR_FONT_ID	font;
static GR_IMAGE_ID	PopupBox ;
static GR_IMAGE_ID	s_iYellow ;
static GR_IMAGE_ID	s_iBlue ;
static GR_IMAGE_ID	s_iGreen ;
static GR_IMAGE_ID s_pBgImage ;
static GR_IMAGE_ID s_Alt ;
static GR_IMAGE_ID s_Arka ;
#define ROW1_X	100
#define ROW1_Y	400
#define ROW1_H	15
///
static void ResimYukle(void)
{
 PopupBox =GrLoadImageFromFile(FILE_IMAGE"/PopupBox.jpg", FALSE);
 s_Alt =GrLoadImageFromFile(FILE_IMAGE"/pan.jpg",FALSE);
 s_Arka =GrLoadImageFromFile(FILE_IMAGE"/arka.jpg",FALSE);

}
static void ResimHafiza(void)
{GrFreeImage(PopupBox);
GrFreeImage(s_Alt);
GrFreeImage(s_Arka);
}




typedef struct {

	const char *name;
	int mode;
	// key translation pattern
	// 0=DOWN/DOWN/.../UP
	// 1=DOWN/DOWN/.../LONG/UP
	// 2=DOWN/.../LONG/.../UP
	// 3=.../LONG --> DOWN+UP or .../UP --> DOWN/UP
	int count;
	int key[2];
	unsigned short mwkey;

}keys_map_td210;

#define MAX_KEY 60
keys_map_td210 keys_td210[MAX_KEY] = {
	{ "MWKEY_ASCII_0", 0, 3, {  0,  4 }, '0'}, // 0 T0
	{ "MWKEY_ASCII_1", 0, 3, {  1,  5 }, '1'}, // 1 T1
	{ "MWKEY_ASCII_2", 0, 3, {  2,  6 }, '2'}, // 2 T2
	{ "MWKEY_ASCII_3", 0, 3, {  3,  7 }, '3'}, // 3 T3
	{ "MWKEY_ASCII_4", 0, 3, {  4,  8 }, '4'}, // 4 T4
	{ "MWKEY_ASCII_5", 0, 3, {  5,  9 }, '5'}, // 5 T5
	{ "MWKEY_ASCII_6", 0, 3, {  6, 10 }, '6'}, // 6 T6
	{ "MWKEY_ASCII_7", 0, 3, {  7, 11 }, '7'}, // 7 T7
	{ "MWKEY_ASCII_8", 0, 3, {  8, 12 }, '8'}, // 8 T8
	{ "MWKEY_ASCII_9", 0, 3, {  9, 13 }, '9'}, // 9 T9
	{ "MWKEY_CHANNEL_UP", 0, 3, { 10, 16 }, MWKEY_CHANNEL_UP}, // A CHUP
	{ "MWKEY_CHANNEL_DOWN", 0, 3, { 11, 17 }, MWKEY_CHANNEL_DOWN}, // B CHDOWN
	{ "Not Allowed", 0, 3, { 12, 18 }, 0}, // C VOLDOWN
	{ "Not Allowed", 0, 3, { 13, 19 }, 0}, // D VOLUP
	{ "Not Allowed", 2, 6, { 14, 20 }, 0}, // E MUTE
	{ "MWKEY_UNKNOWN", 0, 3, { 15, 0  }, MWKEY_UNKNOWN}, // F NONE
	{ "MWKEY_ENTER", 0, 3, { 16, 21 }, MWKEY_ENTER}, // 10 OK
	{ "MWKEY_MENU", 0, 3, { 17, 22 }, MWKEY_MENU}, // 11 MENU
	{ "MWKEY_UP", 0, 3, { 18, 23 }, MWKEY_UP}, // 12 UP
	{ "MWKEY_DOWN", 0, 3, { 19, 24 }, MWKEY_DOWN}, // 13 DOWN
	{ "MWKEY_LEFT", 0, 3, { 20, 25 }, MWKEY_LEFT}, // 14 LEFT
	{ "MWKEY_RIGHT", 0, 3, { 21, 26 }, MWKEY_RIGHT}, // 15 RIGHT
	{ "MWKEY_ESCAPE", 0, 3, { 22, 28 }, MWKEY_ESCAPE}, // 16 EXIT
	{ "MWKEY_REWIND", 0, 3, { 23, 34 }, MWKEY_REWIND}, // 17 REW
  	{ "MWKEY_STOP", 0, 3, { 24, 35 }, MWKEY_STOP}, // 18 STOP
	{ "MWKEY_PLAY", 0, 3, { 25, 36 }, MWKEY_PLAY}, // 19 PLAY
	{ "MWKEY_FAST_FWD", 0, 3, { 26, 37 }, MWKEY_FAST_FWD}, // 1A FWD
	{ "MWKEY_TRACK_PREV", 0, 3, { 27, 38 }, MWKEY_TRACK_PREV}, // 1B PREV
	{ "MWKEY_TRACK_NEXT", 0, 3, { 28, 39 }, MWKEY_TRACK_NEXT}, // 1C NEXT
	{ "MWKEY_RECORD", 0, 3, { 29, 40 }, MWKEY_RECORD}, // 1D RECORD
	{ "MWKEY_BACKSPACE", 0, 3, { 30, 14 }, MWKEY_BACKSPACE}, // 1E DEL
	{ "MWKEY_UNKNOWN", 0, 3, { 31,  0 }, MWKEY_UNKNOWN}, // 1F NONE
	{ "MWKEY_CAPSLOCK", 0, 3, { 32, 15 }, MWKEY_CAPSLOCK}, // 20 CAPS
	{ "MWKEY_COLORED_KEY_0", 0, 3, { 33, 58 }, MWKEY_COLORED_KEY_0}, // 21 RED
	{ "MWKEY_COLORED_KEY_1", 0, 3, { 34, 59 }, MWKEY_COLORED_KEY_1}, // 22 GREEN
	{ "MWKEY_COLORED_KEY_2", 0, 3, { 35, 60 }, MWKEY_COLORED_KEY_2}, // 23 YELLOW
	{ "MWKEY_COLORED_KEY_3", 0, 3, { 36, 61 }, MWKEY_COLORED_KEY_3}, // 24 BLUE
	{ "MWKEY_GUIDE", 0, 3, { 37, 41 }, MWKEY_GUIDE}, // 25 Guide
	{ "MWKEY_F1", 0, 3, { 38, 30 }, MWKEY_F1}, // 26 CHECK
	{ "Not Allowed", 0, 3, { 39, 56 }, 0}, // 27 RESOL
	{ "MWKEY_INFO", 0, 3, { 40, 47 }, MWKEY_INFO}, // 28 INFO
	{ "MWKEY_F2", 0, 3, { 41, 57 }, MWKEY_F2}, // 29 TVRADIO
	{ "MWKEY_UNKNOWN", 2, 7, { 42,  1 }, MWKEY_UNKNOWN}, // 2A Power
	{ "MWKEY_HOME", 2, 3, { 43, 46 }, MWKEY_HOME}, // 2B Home
	{ "Not Allowed", 0, 3, { 44, 53 }, 0}, // 2C UHF
	{ "Not Allowed", 0, 3, { 45, 54 }, 0}, // 2D AUX
	{ "Not Allowed", 0, 3, { 46, 55 }, 0}, // 2E USB Eject
	{ "MWKEY_F3", 0, 3, { 47, 29 }, MWKEY_F3}, // 2F Search
	/* New Key */
	{ "MWKEY_ESCAPE", 0, 3, { 48, 63 }, MWKEY_ESCAPE}, // 30 UTUBE
	{ "MWKEY_ESCAPE", 0, 3, { 49, 64 }, MWKEY_ESCAPE}, // 31 WWW
	{ "MWKEY_ESCAPE", 0, 3, { 50, 65 }, MWKEY_ESCAPE}, // 32 EMAIL
	/* Front Key */
	{ "MWKEY_UP", 0, 3, { 51, 44 }, MWKEY_UP}, // 33 ---UP
	{ "MWKEY_DOWN", 0, 3, { 52, 45 }, MWKEY_DOWN}, // 34 ---DOWN
	{ "MWKEY_LEFT", 3, 3, { 53, 42 }, MWKEY_LEFT}, // 35 ---LEFT
	{ "MWKEY_RIGHT", 3, 3, { 54, 43 }, MWKEY_RIGHT}, // 36 ---RIGHT
	{ "MWKEY_HOME", 0, 3, { 55, 46 }, MWKEY_HOME}, // 37 ---LAN(HOME)
	//{ "K_LAN__", 0, 3, { 55, 62 }, }, // 37 ---LAN(HOME)
	/* Virtual Key */
	{ "MWKEY_ESCAPE", 0, 3, { 56, 49 }, MWKEY_ESCAPE}, // 38 SLEEP
	{ "MWKEY_ESCAPE", 0, 3, { 57, 50 }, MWKEY_ESCAPE}, // 39 WAKEUP
	{ "", 0, 3, { 58, 51 }, MWKEY_UNKNOWN}, // 40 VSLEEP
	{ "", 0, 3, { 59, 52 }, MWKEY_UNKNOWN}, // 41 VWAKEUP
};

/* A counter - used so you can see the display being updated. */
static int getSerialNumber(void)
{
	static int serial = 0;
	if (++serial >= 1000)
		serial = 0;
	return serial;
}

/* If a character is ASCII, return it, else return a question mark. */
static char keyToChar(int key)
{
	if ((key >= 32) && (key <= 127)) {
		return (char)key;
	} else {
		return '?';
	}
}

/* Makes a GrGrabKey() type paramater into a human-readable string */
static const char *grabKindName(int kind)
{
	switch (kind) {
		case GR_GRAB_HOTKEY_EXCLUSIVE:
			return "GR_GRAB_HOTKEY_EXCLUSIVE";
		case GR_GRAB_HOTKEY:
			return "GR_GRAB_HOTKEY";
		case GR_GRAB_EXCLUSIVE:
			return "GR_GRAB_EXCLUSIVE";
		case GR_GRAB_EXCLUSIVE_MOUSE:
			return "GR_GRAB_EXCLUSIVE_MOUSE";
		default:
			return "Invalid GR_GRAB_ mode";
	}
}

/* Repaint a specified area of the window */
int repaint(int x, int y, int width, int height)
{ //Sistem ekrana yazırılıyor

font = GrCreateFont(FONTNAME, 10, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);

    GrSetGCForeground(main_gc, GR_RGB(145,139,90)	);//Arka platform rengi
         GrDrawImageToFit(main_window,main_gc,x,y ,width, height,s_Arka);
 //GrFillRect(main_window, main_gc, x, y, width, height);//içi boyalı dikdörtgen

	GrSetGCUseBackground(main_gc, GR_FALSE); //DIGTORGEN ARKA PLANINI AL
	GrSetGCForeground(main_gc, GR_RGB(58,165,188)	);//Arka platform rengi

 //	GrFillRect(main_window, main_gc, 0, 380, width,60);//içi boyalı dikdörtgen



	GrSetGCForeground(main_gc, GR_RGB(50,100,100)); //BUSEKİLDEDE YAZILABİLİR GrGetSysColor(GR_COLOR_APPTEXT) yazi rengi
	//GrText(main_window, main_gc, 200,  400, message1, -1, GR_TFASCII);

	 GrRect(main_window, main_gc,0*75,418,70,20);
	 GrRect(main_window, main_gc,1*75,418,70,20);
	GrRect(main_window, main_gc,2*75,418,70,20);
	GrRect(main_window, main_gc,3*75,418,70,20);
	GrRect(main_window, main_gc,4*75,418,70,20);
	GrRect(main_window, main_gc,5*75,418,70,20);
	GrRect(main_window, main_gc,6*75,418,70,20);
	GrSetGCForeground(main_gc, GR_RGB(25,100,100));
	GrDrawImageToFit(main_window,main_gc,6,10 ,50,50,s_Alt);
	GrFillRect(main_window, main_gc,menuatla*75,418,70,20);
	GrSetGCForeground(main_gc, GR_RGB(100,100,100));
	GrFillRect(main_window,main_gc,60,5 ,560,410);


	font = GrCreateFont(FONTNAME, 15, NULL);
	GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
	GrSetGCFont(main_gc, font);
	GrSetGCForeground(main_gc, GR_RGB(0,0,255));
	 GrText(main_window, main_gc, 300 ,200, "Wait......", -1, GR_TFASCII);

	 //GrRect(main_window, main_gc, 5, 5, WIDTH - 10, 355);
	//GrRect(main_window, main_gc, 5,385, WIDTH - 10,50 );
	draw_menu_key();
}
/* Repaint the entire window */
static void repaintAll(void)
{
	repaint(0,0,WIDTH,HEIGHT);
}

static void		Resim_Init(void)
{
	ResimYukle();
}



int
main(int argc,char **argv)
{
	GR_EVENT 	event;
	GR_WM_PROPERTIES props;
	int grabResult;
	int key = 'a';
	int grabKind = GR_GRAB_HOTKEY_EXCLUSIVE;

isim="geo.txt";
sprintf(Url3,"http://maps.google.com/maps/geo?q=ali&output=txt&key=abcdefg&oe=utf8");
indir (isim,Url3);
Oku2();








DosyaOku();
   isim=FILE_IMAGE"/inen.gif";
 rkont=0;
  if (zoom ==0) zoom=1;
  if (carpan==0) carpan=1;
//ycord=0;
//xcord=0;

renkli=0;
artis=50;
secim=0;
//Ekranla bağlantı kur
	if (GrOpen() < 0) {
		printf("Can't open graphics\n");
		exit(1);
	}
	/* pass errors through main loop*/

	GrSetErrorHandler(NULL);
	Resim_Init();


	main_window = GrNewWindow(GR_ROOT_WINDOW_ID, 20, 20, WIDTH, HEIGHT,
		0, GREEN, RED);

	props.flags = GR_WM_FLAGS_PROPS | GR_WM_FLAGS_TITLE;
	props.props = GR_WM_PROPS_NOBACKGROUND;
	props.title = "Nano-X GrabKey Demo";
	GrSetWMProperties(main_window, &props);

	main_gc = GrNewGC();


	grabResult = GrGrabKey(main_window, key, grabKind);
	//printf("%d\n", grabResult);

	GrSelectEvents(main_window, GR_EVENT_MASK_EXPOSURE | GR_EVENT_MASK_CLOSE_REQ
			| GR_EVENT_MASK_KEY_DOWN | GR_EVENT_MASK_KEY_UP);
	GrMapWindow(main_window);
	GrSetFocus(main_window);

//	sprintf(Url3,"http://maps.google.com/staticmap?center=%f,%f&zoom=%d&size=400x400&maptype=%s&key=MAPS_API_KEY&sensor=true_or_false",xcord,ycord,zoom,secim);
	//indir (isim,Url3);

	for (;;) {

		GrGetNextEvent(&event);
		switch (event.type)
		{
		case GR_EVENT_TYPE_EXPOSURE:
			repaint(event.exposure.x, event.exposure.y,
				event.exposure.width, event.exposure.height);
			break;
		case GR_EVENT_TYPE_CLOSE_REQ:
			GrClose();
			exit(0);
			break;
		case GR_EVENT_TYPE_ERROR:
			printf("\7grabdemo: Error (%s) ", event.error.name);
			printf(nxErrorStrings[event.error.code],event.error.id);
			break;
		case GR_EVENT_TYPE_KEY_DOWN:
			{
				int i;
				for(i=0;i<MAX_KEY;i++)
				{
if(keys_td210[i].mwkey == event.keystroke.ch)
{

/*  sprintf(message1, "%d uuu %03d Keyrrrr %d (%s) scan %d pressed \n",kartim,
								getSerialNumber(), event.keystroke.ch,
			keys_td210[i].name, event.keystroke.scancode);*/
if (keys_td210[i].name=="MWKEY_UP")
{
xcord=xcord+artis/(zoom*carpan);
//if (xcord>70) xcord=-70;
}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_DOWN")
{
xcord=xcord-artis/(zoom*carpan);
//if (xcord<-70) xcord=70;
}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_LEFT")
{ycord=ycord-artis/(zoom*carpan);//if (ycord<-90) ycord=90;
}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_RIGHT")
{ycord=ycord+artis/(zoom*carpan);//if (ycord>90) ycord=-90;
}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_ENTER")
{
	sprintf(hata,"Saving position....");
Bekle(hata);
Sakla();
}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_ASCII_3") //sol MWKEY_CHANNEL_UP
{
zoom=zoom-1;
if (zoom<1) zoom=1;}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_ASCII_4") //sol MWKEY_CHANNEL_DOWN
{
zoom=zoom+1;
}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_COLORED_KEY_0") //sol MWKEY_COLORED_KEY_0
{
menuatla=menuatla-1;
if (menuatla<0) menuatla=6;rkont==0;repaintAll();}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_COLORED_KEY_1") //saÄŸ MWKEY_COLORED_KEY_1
{
menuatla=menuatla+1;
if (menuatla>6) menuatla=0;
rkont==0;repaintAll();			}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_ASCII_0")
{
if (renkli==0)
{
renkli=1;}
else
{renkli=0;}
}
////////////////////////////////////////////////////////////////////////////////
if (keys_td210[i].name=="MWKEY_ASCII_0") // MWKEY_COLORED_KEY_2
{
carpan=carpan+10;
sprintf(hata,"Step=%d",carpan);
Bekle(hata);
goto atlama;
}

if (keys_td210[i].name=="MWKEY_ASCII_1")// MWKEY_COLORED_KEY_3
{
carpan=carpan-10;
if (carpan <1) carpan=1;

sprintf(hata,"Step=%d",carpan);
Bekle(hata);
goto atlama;
}




break;
}}}

//font = GrCreateFont(FONTNAME, 15, NULL);
//GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
//GrSetGCFont(main_gc, font);

			sprintf(hata,"Wait...Downloading file..");
Bekle(hata);
Bekle(hata);
if (menuatla==0) secim="roadmap";
if (menuatla==1) secim="mobile";
if (menuatla==2) secim="satellite";
if (menuatla==3) secim="terrain";
if (menuatla==4) secim="hybrid";
if (menuatla==5) secim="mapmaker-roadmap";
if (menuatla==5) secim="mapmaker-hybrid";
sprintf(Url3,"http://maps.google.com/staticmap?center=%f,%f&zoom=%d&size=550x400&maptype=%s&key=MAPS_API_KEY&sensor=true_or_false",xcord,ycord,zoom,secim);
indir (isim,Url3);
//printf("renkli=%d",renkli);
if (rkont==1)
{Goster();
}
atlama:printf("");
if (rkont==3)
{
	sprintf(hata,"error has occurred..");

	//hata="error has occurred..";
Bekle(hata);
Bekle(hata);
}

break;
}}
ResimHafiza();
GrClose();
 return 0;
}

Goster()
{

	GrFreeImage(s_pBgImage);
if (renkli==0)
{s_pBgImage=GrLoadImageFromFile(FILE_IMAGE"/inen.gif",FALSE);}
	else
{
s_pBgImage=GrLoadImageFromFile(FILE_IMAGE"/inen.gif",TRUE);
}

font = GrCreateFont(FONTNAME, 10, NULL);
GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
GrSetGCFont(main_gc, font);
//GrSetGCForeground(main_gc, GR_RGB(145,139,90)	);//Arka platform rengi



GrDrawImageToFit(main_window,main_gc,65,10 ,550,400,s_pBgImage);

}







////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////


int DosyaOku()
{Goruntu=0;
FILE *fp1;
   char birkelime;
   char *c;
   int a,t,f,b;
   a=0;f=0;
   fp1 = fopen("pozisyon.cfg","r");


   do {
	//   birkelime  ='bos';
	   birkelime = fgetc(fp1);
     if (birkelime  != NULL);
     if (birkelime  =='\n' )
     {birkelime='\n';
     //server[a][f-1]= '\0';//birkelime;
server[a][f+1]= '\0';
uzunluk[a]=f+1;
//printf("****%s--- %d \n",server[a],a);
     f=0;
     a=a+1;
     }
     else
     {    if (birkelime  ==(int) 9 ) goto bak;
     if (birkelime  ==' ' ) goto bak;
    	 server[a][f]= birkelime;
       f=f+1;
 //      printf("%d \n",birkelime);
   bak:printf("");
     }

   } while (birkelime != '\377' );
   fclose(fp1);

a=a;
t=0;
Ayir(a);
}

int Ayir(int Topa)
{int g,uzl,kont,m;

for(g=0;g<Topa;++g)
{kont=0;m=0;
for(uzl=0;uzl<uzunluk[g];++uzl)
{
if(server[g][uzl]==';')
{kont=kont+1;
m=0;
//printf("%d ---kont \n",kont);
goto atla;
}

if(kont==0 )
{
Baslik[g][uzl]=server[g][uzl];
} //kont=0;


if(kont==1 )
{Url[g][m]=server[g][uzl];
m=m+1;

} //kont=0;


if(kont==2 )
{ZooM[g][m]=server[g][uzl];
m=m+1;

} //kont=0;

if(kont==3 )
{CarpaN[g][m]=server[g][uzl];
m=m+1;

} //kont=0;






atla:printf("");
} //uzl

} //g

xcord=atof(Baslik[0]);
ycord=atof(Url[0]);
zoom=atof(ZooM[0]);
carpan=atof(CarpaN[0]);
printf("xcord=%f ycord=%f Zoom=%d Carpan=%d \n",xcord,ycord,zoom,carpan);
}



struct FtpFile {
  const char *filename;
  FILE *stream;
};

static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
{
  struct FtpFile *out=(struct FtpFile *)stream;
  if(out && !out->stream) {
    /* open file for writing */
    out->stream=fopen(out->filename, "wb");
    if(!out->stream)
      return -1; /* failure, can't open file to write */
  }
  return fwrite(buffer, size, nmemb, out->stream);
}


/*int main(void)
{char *bmpServer,*isim;

bmpServer="http://www.westland.net/photo/file01.jpg";
isim="veli.jpg";
	indir(isim,bmpServer);
}*/
 indir(char *isim,char *BMPserver)
{ CURL *curl;
	  CURLcode res;
	  struct FtpFile ftpfile={isim, /* name to store the file as if succesful */
	    NULL
	  };

	  curl_global_init(CURL_GLOBAL_DEFAULT);

	  curl = curl_easy_init();
	  if(curl) {
	    /*
	     * Get curl 7.9.2 from sunet.se's FTP site. curl 7.9.2 is most likely not
	     * present there by the time you read this, so you'd better replace the
	     * URL with one that works!
	     */
	    curl_easy_setopt(curl, CURLOPT_URL,BMPserver);
	    /* Define our callback to get called when there's data to be written */
	    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
	    /* Set a pointer to our struct to pass to the callback */
	    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);

	    /* Switch on full protocol/debug output */
	    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

	    res = curl_easy_perform(curl);
	      printf("%d...\n",res);
	    if(CURLE_OK == res)
	    {
	 //     printf("Dosya indirildi...\n");
	      rkont=1;
	    }
	    /* always cleanup */
	    curl_easy_cleanup(curl);

	    if(CURLE_OK != res) {
	      /* we failed */
	      fprintf(stderr, "curl told us %d\n", res);
	      //printf("Hata oluÅŸtu");
	      rkont=3;
	    }
	  }

	  if(ftpfile.stream)
	    fclose(ftpfile.stream); /* close the local file */

	  curl_global_cleanup();

	  return 0;
}





 int Bekle(char *hata2)
 {font = GrCreateFont(FONTNAME, 10, NULL);
 GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
 GrSetGCFont(main_gc, font);
 GrDrawImageToFit(main_window,main_gc,250,200 ,200,50,PopupBox);
 GrText(main_window, main_gc, 270 ,225, hata2, -1, GR_TFASCII);
 GrDestroyFont(font);
 }



 static void draw_menu_key()
 {

 font = GrCreateFont(FONTNAME, 10, NULL);
 GrSetFontAttr(font, GR_TFANTIALIAS|GR_TFKERNING, 0);
 GrSetGCFont(main_gc, font);
// GrDrawImageToFit(main_window,main_gc,100,400 ,24,23,s_iBlue);
// GrDrawImageToFit(main_window,main_gc,250,400 ,24,23,s_iGreen);
// GrDrawImageToFit(main_window,main_gc,400,400 ,24,23,s_iYellow);
 GrSetGCForeground(main_gc, GR_RGB(0,0,0));
 GrText(main_window, main_gc, 5 ,433, "roadmap", -1, GR_TFASCII);
 GrText(main_window, main_gc, 80 ,433, "mobile", -1, GR_TFASCII);
 GrText(main_window, main_gc, 155,433, "satellite", -1, GR_TFASCII);
 GrText(main_window, main_gc, 230 ,433, "terrain", -1, GR_TFASCII);
 GrText(main_window, main_gc, 305 ,433, "hybrid", -1, GR_TFASCII);
 GrText(main_window, main_gc, 380 ,433, "mm-roadmap", -1, GR_TFASCII);
 GrText(main_window, main_gc, 455 ,433, "mm-hybrid", -1, GR_TFASCII);
 GrSetGCForeground(main_gc, GR_RGB(255,0,0));
 GrText(main_window, main_gc, 520 ,433, "www.azbox4yu.com", -1, GR_TFASCII);

 GrText(main_window, main_gc, 5 ,450, "Press Ok positions save // Yellow step + // Blue step - // Zoom Out CH+ // Zoom in CH- // Menu-Red-Green //    By AzDev", -1, GR_TFASCII);
 GrDestroyFont(font);
 sleep(1);
 Goster();
 }


 int Sakla()
 {
 FILE *fp1;
    fp1 = fopen("pozisyon.cfg","w");
    fprintf(fp1,"%f;%f;%d;%d \n",xcord,ycord,zoom,carpan);
    fclose(fp1);
 }




//#include <stdio.h>
//#include <string.h>


int Oku2()
	{char Anahtar[8],bak[8];
	   char Adres[100][500],KordX[100][500],KordY[100][500];
	int d;
	   FILE *fp1;
	   char birkelime[500];
	   char *c;
	   d=0;
	   fp1 = fopen("geo.txt","r");
	   do {
	     c = fgets(birkelime,100,fp1); /* bir satir okuyalim */
	     if (c != NULL)
Anahtar[0]=birkelime[5];//a-c
Anahtar[1]=birkelime[6];//d-o
Anahtar[2]=birkelime[7];//d-o
Anahtar[3]=birkelime[8];//r-r
Anahtar[4]=birkelime[9];//e-d
Anahtar[5]=birkelime[10];//s-i
Anahtar[6]=birkelime[11];//s-n
Anahtar[7]='\0';//s-n
bak[0]='a';//-c
bak[1]='d';//-o
bak[2]='d';//-o
bak[3]='r';//-r
bak[4]='e';//-d
bak[5]='s';//-i
bak[6]='s';//-n
bak[7]='\0';//-n
if (strcmp(Anahtar,bak)==0)
{
	int uzk,uzr;
uzr=strlen(birkelime);

	for(uzk=16;uzk<uzr;++uzk)
	{
		Adres[d][uzk-16]=birkelime[uzk];

	}
	Adres[d][uzk-19]='\0';
	//sprintf(Adres[a],"%s",birkelime);
	printf("Adres=%s \n",Adres[d]);
	d=d+1;
}

bak[0]=' ';//-c
bak[1]='"';//-o
bak[2]='c';//-o
bak[3]='o';//-r
bak[4]='o';//-d
bak[5]='r';//-i
bak[6]='d';//-n
bak[7]='\0';//-n

if (strcmp(Anahtar,bak)==0)
{
int uzk,uzr,korty,cm;
uzr=strlen(birkelime);
korty=0;
cm=0;
for(uzk=23;uzk<uzr;++uzk)
{
if (birkelime[uzk]==',') { korty=korty+1;cm=0;goto gh;}
if (birkelime[uzk]==' ') { goto gh;}
if (korty==0)	{KordX[d][cm]=birkelime[uzk];}
if (korty==1) 	{KordY[d][cm]=birkelime[uzk];}
cm=cm+1;
gh:printf("");
}
printf("Kordinat kort=%d<-->%s/%s\n",korty,KordX[d],KordY[d]);
}
	   } while (c != NULL);
	   fclose(fp1);
	}


Zapol som si surflock ! Max 1sz za 24 hod ! A0 00
Uživatelský avatar
grantec
Administrátor
Administrátor
Příspěvky: 5634
Registrován: 14 led 2009, 21:26
Bydliště: Slovensko
Dostal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: AZbox HD - vyvoj

Příspěvek od grantec »

SDK 0.1.1 - doplnene audioAPI - akt. 14.10.2009

http://www.ulozisko.sk/222630/Plugins-SDK-0.1.1.tgz


Zapol som si surflock ! Max 1sz za 24 hod ! A0 00
Uživatelský avatar
grantec
Administrátor
Administrátor
Příspěvky: 5634
Registrován: 14 led 2009, 21:26
Bydliště: Slovensko
Dostal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: AZbox HD - vyvoj

Příspěvek od grantec »

Setting up an AZBox cross-compiling environment (i.e. toolchain for the MIPS Sigma processor)

Recently, I was playing with my new AZBox, a Linux-powered DVB-S receiver. It is a MIPS platform with a Sigma processor. AZBox's official site provides SDK for programming together with a simple example plugin. Since setting up the compiling environment on my Ubuntu 9.04 was not so straightforward, I have written this post. So, the goal is to compile, install and run the provided example plugin on the AZBox. (This HOWTO is based on Geordy's blog post and Jorgen's comments. Thanks!)

1. Make sure you have installed all important pre-requisites:

Kód: Vybrat vše

sudo apt-get install flex genromfs bison libncurses5-dev ncurses-base gcc-3.4
2. Download and extract official toolchain of Sigma:

Kód: Vybrat vše

wget http://www.networkedmediatank.com/download/firmware/nmt/gpl/smp86xx_toolchain.20080505.tar.bz2
      tar -xjsf smp86xx_toolchain.20080505.tar.bz2
3. Download and extract AZBox-SDK:

Kód: Vybrat vše

wget http://www.azupd.com/Plugins-SDK.tgz
      tar -xzf Plugins-SDK.tgz
Pozor- uz davno nedostupny link - ostatne novy SDK je v linku vyssie- nutne najskor stiahnut na hdd ! A az potom rozbalit - manulane.
4. Continue with preparing the toolchain:

Kód: Vybrat vše

cd smp86xx_toolchain.20080505
      export CC=gcc-3.4
      make menuconfig
You don't need to change anything in the configuration, just select "exit".

5. Next, start the toolchain compilation. It will last for some time and some stuff will be automatically downloaded from the Internet:

Kód: Vybrat vše

make
If everything went right, you are now prepared to compile for your AZBox.

6. Load environment variables needed for cross-compilations:

Kód: Vybrat vše

source toolchain-path.env
7. Now move to the directory of the AZBox's sample plugin, "mwkeytest":

Kód: Vybrat vše

cd ../azbox-sdk/ExternTarget/samples
8. Compile the sample plugin:

Kód: Vybrat vše

make install
9. Two files, mwkeytest.plugin and plugins.lst would be created. Copy them via FTP to your AZBox's /tmp directory.

10. Take AZBox's remote control, go to the Plugins menu and select installation of the new plugin "mwkeytest" from /tmp.

11. Now run your new plugin "mwkeytest"! It is a simple application that displays key-press events that it receives.


Zapol som si surflock ! Max 1sz za 24 hod ! A0 00
Uživatelský avatar
grantec
Administrátor
Administrátor
Příspěvky: 5634
Registrován: 14 led 2009, 21:26
Bydliště: Slovensko
Dostal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: AZbox HD - vyvoj

Příspěvek od grantec »

[API] AZBox TV API ( By OpenSAT )

To all developers,

Here is the AZBox TV SDK, with it you can manage:


* Channel List
* EPG
* Reserved Recordings
* Reload files


From your plugins

To reload the channel list without reboot you just need to call:

Kód: Vybrat vše

#define TVSDK_SYNC_ID_NONE 0
#define TVSDK_SYNC_ID_CHANNEL 1
#define TVSDK_SYNC_ID_EPG 2
#define TVSDK_SYNC_ID_RESERVED 3

err = TVSDK_Sync(TVSDK_SYNC_ID_CHANNEL);
Nemáte oprávnění prohlížet přiložené soubory.


Zapol som si surflock ! Max 1sz za 24 hod ! A0 00
Uživatelský avatar
grantec
Administrátor
Administrátor
Příspěvky: 5634
Registrován: 14 led 2009, 21:26
Bydliště: Slovensko
Dostal poděkování: 2 poděkování
Kontaktovat uživatele:

Re: AZbox HD - vyvoj

Příspěvek od grantec »

Nova verzia API TV - pre dvojtuner

Kód: Vybrat vše

To all developers,

Here is the AZBox TV SDK, with it you can manage:

* Channel List
* EPG
* Reserved Recordings
* Reload files

From your plugins

To reload the channel list without reboot you just need to call:

Kód: Vybrat vše

#define TVSDK_SYNC_ID_NONE 0
#define TVSDK_SYNC_ID_CHANNEL 1
#define TVSDK_SYNC_ID_EPG 2
#define TVSDK_SYNC_ID_RESERVED 3

err = TVSDK_Sync(TVSDK_SYNC_ID_CHANNEL);
Nemáte oprávnění prohlížet přiložené soubory.


Zapol som si surflock ! Max 1sz za 24 hod ! A0 00
Odpovědět

Zpět na „AzBox HD diskuze“