Giter VIP home page Giter VIP logo

Comments (5)

swift-kim avatar swift-kim commented on June 3, 2024

Unfortunately, that's normal. Most of SDB features, including dlog, are not supported on TV due to VD's security policy. Only stdout/stderr of the running app process can be viewed in the flutter-tizen run console. (There are some options to see internal logs of the embedder or plugins.) The guide you checked is for native (C/C++) applications. Native app development is not possible with TV because they don't publicly release the native SDK.

Is there a specific log you want to see?

from plugins.

IhabMks avatar IhabMks commented on June 3, 2024

Hi,
Thanks for the fast reply.
So it's something related to the videoHole player plugin, i have the below piece of code, and sometimes there are some videos that works and some doesn't with almost the same parameters, so i'd like to get the LOGS that the native part outputs. It could be anything like:

LOG_ERROR("[DrmLicenseHelper] Invalid DRM Type");
LOG_ERROR("[DrmLicenseHelper] UserAgent attach 
LOG_ERROR("[DrmLicenseHelper] Failed to set HTTP header.");
LOG_ERROR("[DrmLicenseHelper] Failed to compose post data, drm_result: 0x%lx",drm_result);
LOG_ERROR(
            "[DrmLicenseHelper] Server returns response Code %ld [%s][%d]",
            http_session->res_code, http_session->body.data,
            http_session->body.size);

Current code:

@override
  void initState() {
    super.initState();
    final myHeader = videoPlayerLicenseHeader(token);
    _controller = VideoPlayerController.network(
      _videoUrl,
      drmConfigs: DrmConfigs(
          type: _drmType,
          licenseCallback: (Uint8List challenge) async {
            final dio = Dio();
            logger.i('send license request to license server...');
            try {
              final response = await dio.post(
                _licenseUrl,
                data: Stream.fromIterable(challenge.map((e) => [e])),
                options: Options(
                    responseType: ResponseType.bytes, headers: myHeader),
              );
              String plainResponse = String.fromCharCodes(response.data);
              logger.d(plainResponse);
              
              return response.data;
            } catch (e) {
              if (e is DioError) {
                if (kDebugMode) {
                  if (e.response != null) {
                    debugPrint(e.stackTrace);
                    final statusCode = e.response!.statusCode;
                    final statusMessage = e.response!.statusMessage;
                    final errorData = e.response!.data;
                    String errorDataString = String.fromCharCodes(errorData);

                    logger.e("statusCode : $statusCode");
                    logger.e("statusMessage : $statusMessage");
                    logger.e("errorDataString : \n$errorDataString");
                  }
                }
                return Uint8List(0);
              } else {
                //logger.e('Error while sending the license request: $e');
                logger.i('Error while sending the license request: $e');
                debugPrint("$e");
                return Uint8List(0);
              }
            }
          }),
    );

What i get after decoding the byte data on a license with error message :

Ì
T
3FBE05BA5489A5C24800000000000000 3FBE05BA5489A5C24800000000000000

Whereas, when the license works, i get a readable xml response.

from plugins.

hyue7 avatar hyue7 commented on June 3, 2024

Hi, @IhabMks
As Mr.Kim said, dlog is not support on TV due to VD's security policy. You only can see the running app logs in flutter-tizen run console. For example, the videohole plugin:
change codes in log.h:

#include<iostream>
#define LOG(prio, fmt, arg...)                                         \
  printf("%s: %s(%d) > " fmt, __MODULE__, __func__, \
             __LINE__, ##arg)

then you can see the logs in videohole plugin.

from plugins.

swift-kim avatar swift-kim commented on June 3, 2024

nit: For better line breaking

-  printf("%s: %s(%d) > " fmt, __MODULE__, __func__, \
+  printf("%s: %s(%d) > " fmt "\n", __MODULE__, __func__, \

from plugins.

IhabMks avatar IhabMks commented on June 3, 2024

Hi,
Well that's unfortunate, because currently i can't get the proper error message as i only get "Format not supported" which doesn't make sense because the same format video works fine without authorization and considering that, the error shouldn't be related to the format but to the authorization.

from plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.